tidied up some code, removed un-needed extras