Cleaned up memory model and UI