Added compact option (true = current behavior, false = more verbose insert statements)