Added header file

moved the prototypes to a header with the enum and struct to make the
main file more manageable .