General clean-up, removing unused code