Fixed numerous bugs. Listed in the order committed. Fixed [#1267532]. Applied patch in comment #5. Credit goes to nlehuen, Matthew Davidson. Fixed [#1245582]. Applied patch in comment #39. Credit goes to Cauliflower, tim.plunkett. Fixed [#1800606]. Applied patch in comment #4. Credit goes to bevanw. Fixed [#965450]. Applied patch in comment #21. Credit goes to tim.plunkett. Fixed [#1548142]. Applied patch in comment #1. Credit goes to daveparrish, lee20. Thanks to everyone who contributed!