Refactoring the previour 2 commits.

This commit fixes #244.
Merge branch 'id/244' into dev