Cleaned up some unused code