- fixed bugs added unit tests
- sketch for shape merging
- minor refactoring