Continued refactoring + added scourcemaps.