Implements local product creation
Fixes a few bugs in the logic