Rest of Brandon's code.