Tidy up of code added a header file.