Close cursor after single item marshalled (get)
Enforce generic type and tidy
Remove unused files