refactored code, spring, rest, gradle added

* maven is broken - will fix it in next version, Gradle build works
fine. Spring code, web, mvc added and Rest added.