Cleaned up State Machines