cleaning up some of the code and switching up to root route