Added ML to the DatabaseInterface and a few private utility methods.
Also converted almost everything to arrays