Worked on refactoring and new duration formatting