cleaned up routes and lib