Fixes #13
Added test + cleanup for #13

Signed-off-by: Fred Bricon <fbricon@gmail.com>