Added 'smart' RAM management