Refactor `push-state!` fn