Removed some unnecessary code
Changes sql to match enum in Product