small refactor flags, add lgtm, refactor code
Merge pull request #7 from crosbymichael/change_flags

small refactor flags, add lgtm, refactor code