Several bug fixes. Commented out a lot of unneccessary code.