Bitmask tileset
Formatting
Minor refactoring