Deleted bad code, debugged remaining bad code a little