implemented type declaration grammar. appears to work nicely.