- Use shared pointers for memory management instead of manual new / delete pairs

Signed-off-by: Kristian Duske <kristian.duske@gmail.com>