cleaned up some memoerrs