Refactored code to use routes. Added some tweaks to the teams page