reformatting and modified moving determination logics

changed logic in determining isMoving.

changed code to reflect more clear coding style.

changed wakelock

changed measureTime from string to long in Measurement. 

changed the default way of formatting date string.