Make the memory configurable

Adds the ability to configure memory through the settings file.