Removed some tests and modified some code