Renamed nameModal to groupModal
Move group modal controller outside of factory

Otherwise, minification will cause problems with mangled parameter
names and dependency injection