Remove dead code
Light refactoring