Updated Memory Management

Signed-off-by: David Fauth <dsfauth@gmail.com>