Reorganize build, add sbt idea plugin.