Refactor from dictionaries to objects

Changing the memory module to return an object rather than a dictionary.

Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>