Fixed a few bugs. Removed unneeded functions. Commented out unused code (for review).