Reintegrate changes from MrTravisB

- SORRY!