Final changes

Added a header file, and modified the original to fit that header file.