Start refactoring code
Finished code refactor. Now using prototypes. Grid entirely based on ems.