code revisions

- apply conventions
- use optimizations
- fix warnings
- use helper method for cloning options
Merge pull request #1 from mojavelinux/468-review

code revisions for pr 468