Memory collection added

Using ps instead of top for added flexibility.