Removed some unused code; Cleaned some stuff