some reformats
cleaned up routing to let it be more clear on what is going on