Minor refactoring and error checking
Merge branch 'master' of github.com:dhruvasagar/powerlessline