cleaned up routes, added api routes, added helpers function, added twig for templating