upgraded durandal and refactored