Clean up.
Better variable name and take clean into account.
Add helper functions.
Make getRange more precise.
Add helper method.
Make it possible to have an enlarged buffer bitmap.