Code cleaning
Fix broken API