TESTING: Debugged and minor corrections