Added explanation of variables, tidied format