Implemented webserver controls / refactored to cleaner structure