State machine and base state class added

Changed License header for all files.