Some refactoring. Added ngProgress