Moved database functionality into dynamic petaloid.
Added petaloid for test purposes.