Refactor method generation

Move method body into block on the ProcedureParseNode class, which
simplifies code generation. (2nd commit since first one missed out
files).