Cleaned up unused code. Actual submitted version.