Merge pull request #81 from eprogramming/master

bug fixes and cleanup