mysqli added, minor fixes

Database access now uses mysqli