New tests and removed unused code