Argh, forgot to turn this into a class