fixed url routing issue,cleaned up a little