documentation updates and refactoring continued
memory api refactoring, unifying allocation into a single entry point