add example ajax
refactoring storage, + private methods and easy API