Adds some of the stuff Adam added that got lost in the last commit