Merge Habib's changes

Jira issue: WP-1319
Merge pull request #27 from TobyEalden/habib-fixes

Merge Habib's changes