States refactoring. Menu state introduced. etc.