anchor.diff:          {lookup, Hashtag, Requestor} ->
               Score = score(Hashtag, HashList),
               case Score == not_found of
  -                true -> scraper:scrape(Hashtag),
  +                true -> whereis(priority_scheduler) ! Hashtag,
                           loop(HashList, [{Hashtag, Requestor}|Requests]);
                   false -> Requestor ! {Hashtag, Score},
                            loop(HashList, Requests)
               end
       end.
  +
  +
  +background_scheduler() ->
  +    receive
  +        Hashtag -> scraper:scrape(Hashtag)
  +    end,
  +    receive
  +    after BFREQ -> background_scheduler()
  +    end.
  +
  +priority_scheduler() -> priority_scheduler(NUM_PRIORITY_THREADS).
  +
  +priority_scheduler(0) -> 
  +    receive
  +    after PFREQ -> priority_scheduler(1)
  +    end;
  +
  +priority_scheduler(N) ->
  +    receive
  +        Hashtag -> scraper:scrape(Hashtag),
  +                   priority_scheduler(N-1)
  +    after PREQ -> priority_scheduler(min_of(N+1, NUM_PRIORITY_THREADS))
  +    end.
  +
  +%% Helper Functions %%
  +
  +crawl([]) -> ok;
  +
  +crawl([H|T]) ->
  +    whereis(background_scheduler) ! H,
  +    crawl(T).
   
   score(Query, [{Hashtag, Score}|T]) ->
       if
  
positive.code: -module(master).
  -export([start/0, test/1, loop/2]).
  
  %% This is our MVP. Call master:test(Hashtag) and it returns the score.
  
  
negative.code:         false -> [{H, R}|remove(Requestor, T)]
      end.
  
  min_of(A, B) ->
      case A > B of
          true -> B;
          false -> A
      end.
  