Remove unnecessay code
Refactoring
Bug fix