Data persistence fixed and documentation added