Remove legacy code

Should fix the master branch but I'm not sure if I disrupted any exiting functionality