Small code clean up
Optimizing bitmap memory usage, issue #10