refactored angularjs code, started with exercises page