Merge pull request #1 from OskarStark/master

configuration and validation added
Merge pull request #2 from OskarStark/master

split long method into smaller ones