Merge pull request #19 from calvinjia/master

Tests Cases
update unit tests.
format the code
add time related constants, shows days in ui.
moved uptime to debug, changed [DEBUG] to [D]