Added unit tests and server-side rendering of initial state