Database Creation Fix

This also includes updates for refunds.