Huge sweeping changes, now things work

Sorry for the super ugly commit