Add malloc and free fn as part of library
- seperate type definitions into their own file
- remove dependencies from MemoryPool