Updated key field handling in scaffold

Signed-off-by: Tom Wright <tom@inflatablecookie.com>