changed m2-server module to have var everywhere, and also changed indentation of whole file