Separated into header files and implementation files
Added #define guards to header files