Built wrapper around mallocs and free memory after usage
excluded some debug outputs
Solved mergeconflicts