Added ngSanitize, and other misc refactoring