Merge pull request #10 from PCMi/master

Bug fixes and upgrades
Change cmd.wait to module.wait for platform independence