split some stuff into files, worked on the route logic