More changes and refactors (snapshot -> state)