Fixed up a fucked attempt to merge changes