Returning promise for contact store function, as discussed on pull request
Seperated state machine into separate functions, as discussed in pull request