Merging changes from Ticket #130

Ticket #130  describes the changes I've made in this branch. I believe it's ready to be merged into `master`.