Fixed all the things I understand are going wrong. Still wondering what else is broken at the moment.