added better documentation in conrollers and main js file