Memory prototype worked out in scratch space. It works! (Best solution? Meh)