Cleanup MapDB code