Modified DB constraints and updated error catch methods