Various small cleanups
Merge pull request #3 from Naosyth/bw-cleaning-code

Various small cleanups