BROKEN Working on converting text datbase to sql

Making helpers to abstract it out (movement to mysql eventually