fixing #19 and more cleanup
Merge remote-tracking branch 'origin/master'