moved js libs to subfolder + Server.hs refactoring