Added closes to the database accesses.
Corrected the options menu group.