corrected some faulty logic in the routes; improved layout