Add tests for state
Start adding update methods to rest api