a lot of infrastructure, added styling and templating stuff