cleanup, better source comments
reorder methods a bit
fix jshint errors