Implemented an abstraction layer around the custom data from the internal api calls that provides cleanup

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>