Fixed trasnformation and database storing. Also, changed depths in reduced database to categorical strings