added keys() methods to iterables
handle missing close braces better on constructs