Made changes to syntax so that controllers would work. Also added proper comments and documentation.