- some minor refactoring
- fixed bug when removing tiles