added invokable initialize function and move the connectDB and checkTables function to the private implementation class; move the private implementation class to an external file