Tidied up comments and added design notes