Adding Maven repository resolver, some refactorings. Sample is not fully working yet due to strange kotlin error