refactor + new page templates
style
style
test refactor and some error handling