Added JSDoc-like documentation
Created loadOptions function
Renamed rootScope as scope