Feature/josie tests

Summary of changes:
(1) Update and create separate file for ap_top method from views.py
(2) Create new unit tests for new methods from utils.py
Just a general -- and minor, I think -- question. Is it good practice (or bad practice, or who cares) to patch error logging everywhere? I understand that in some cases logger doesn't come into play, but should someone in the future make a change that brings it into play, we'd probably want to patch it, so it would save a bit of work.