added some regression tests, updated boolean garbage collection.