Added the ability to set the next manager of the memory library
Redesigned main