Merge pull request #3 from emblaser/hw

Fixed v1 bug, reformatted code, and other minor bug fixes