continued work on DB engine and change GenerateInterface to use reference