Slight code refactor - made a header file and footer file.