Basically all code for Ass2 done.