moving js one level back
structuring browser code like serverside