Refactored watchapp codes.