Tidying up

Made a few changes to get stuff to work...