Fixed typo
Small bit of refactoring

Class for idatabase not working, initialization is bad.