working server-side pre-rendering
refactor app, server side rendering stuff