refactored code and fixed style issues
Merge branch 'master' of https://github.com/Vivarana/FYP