Removed some unused code. Corrected some incorrect names.