22/05/14 finished settings state + tests + bug fixes
TODO: refactoring + cosmetics + consider more intefration tests