Move everything to classes, check that it works.