Refactored package structure and tidied up file header