last bug fixes, cleaned up and reverted tests to original