Fix the stupid workspace and actually refactor stuff.