Refactored utils out. Added memstatus