Fixed gate creation problems
Started implementing parsers for types