Code cleaning

Deleted some tests and test prints
Optimized version