Added memLib and moved things around