Data persistence handling

Added basic data persistence handling on client.