Very little code cleanup
Repair tests