Typo errors fixed
Database initialization completed and small bugfixes