Small API change

Also added non-null constraints to DB