Some more work on size analysis, but unfinished.

I need to talk to Cosmin about this.
Remove some clunky uses of arrayOf function.