Code clean up and format check

Jira Issue: WP-346