tidied variable and constant naming and added headers with license