style tweaks, lint fixes
Version 1.0.1: adding error logging