Removed dead and unused code