Changes from pull request #46 which need to be merged in

Changes from pull request #46 which need to be merged in