Merge attempt

This pull request is same as #95 plus resolved the merge conflicts