Pushed a few memory improvements