Adding basic generation functionality - needs work