Added main state machine and tracking state machine
Various fixes for syntactical bugs on interfaces
Merge of session.py