Added a basic state machine implementation. CMake now automatically picks up all *.c and *.h files in the include and src directories.
Forgot some files...