Modified preamble and tidied