A bunch of changes

* Add gradle support
* flatten UI style
* Use db transactions when inserting class names