Updating to latest model per GP neutron-specs

Also fixing DB model and adding UTs.
fix pep8 issue