Changes to support small memory systems

See discussion in Issues.