Removed empty lines
Improved remove base function
removed bug in context clone method
Added compaction tests
Multiple bugfixes. Most tests pass at this point