Added macros for runtime-linking databases in routines.
Removed complicated multiple-melody system, reverted to single-melody system.