initial tuning

fix comments
more state enum
add an gitignore file
small detail fixes

OK, really fix comments and move enum