Database hooks instead of data arrays
Database issues resolved