Major refactoring. Moved functions into closed function scope, only exposing functions used by web app.
Major refactoring. Moved functions into closed function scope, only exposing functions used by web app.

EivindEE/Madame,EivindEE/Madame,EivindEE/Madame