Added route for favicon (which does nothing)
Major refactoring splitting out functions into smaller parts