Initialize pointer to null
Remove unused mark functions
Use correct signature for free function