removed dead code
Refactoring and Api changes