Cleaned up some tests and code - CP