Restoring kotlin tool functionality, refactoring dependencies and references storage, adding repositories and dependencies resolving