Add database setup. Fix Topic.java error