Added time formatting, device activity refactoring.