Working on resolving locals during state.go
Successfully resolving locals. Need to refactor to clean up the promises mess.