Removed some unused code and imports