Consolodated header files and cleaned up the source