Fixes #56; Introducing ActivityState class