Versions and repo handling improved

With a great help from StackOverflow and the sources of sbt...