Changed some more and made it almost all working

Just a few minor bugs that we need to sort out.