Fixed version 1 bug, reformatted code, and fixed small bugs
Merge remote-tracking branch 'origin/hw' into hw