Tidied up a few little things; also did a few little tests but have hopefully reverted code to normal