Code cleaning & testing