Refactoring: Rename makeNavigation function
Remove mutexes for the statements
Make EntryDatabase to cache prepared statements
Refactoring variously