Added memory output formatting and code to work with interpreter