Refactoring, removing unused declarations