Attempting to fix minor bug.
Adding a non-elegant bugfix.
Moving helpers and routes to separate files.