modified Angular structure to work with UI-Router