Reorganized Memory cog into a separate module