First pull request from ivpusic (GSOC)

Additional info about improvements and changes you can found in commit messages