ref to uneeded file deleted
tidied up if statements, added 1 exception for sockets
flags on ribbon settings