clean up build script.
Some refactorings.

(refucktorings?)
handle unknowns.
Some tests.
Remove maven local.
Merge pull request #1 from alkemist/master

Some improvements.