Converted plant to use database.