Temporary commit

SignOff by Pawel Polawski <p.polawski@samsung.com>
Some refactoring and removing segfault