Moved storage functions to module, added templates and a router for admin and stats page