Fix potential null error involving UUIDs, rewrite pricing code
(hopefully fixing potential for price exploitation involving composites
and also other potential bugs involving initial pricing)