Added beginnings of amm (advanced memory management).