factor C code

Signed-off-by: Matthew Story <matt.story@handshake.com>
typo

Signed-off-by: Matthew Story <matt.story@handshake.com>
fix report header

Signed-off-by: Matthew Story <matt.story@handshake.com>
tests for memory report

Signed-off-by: Matthew Story <matt.story@handshake.com>