refactored the database schema; extracted interface from NfyDbRoute; some smaller fixes