Fix resource reading
Encapsulate js modules
Add site script to server side renderer