Removed obsolete header files and tidied up