Modify to set heap dinamically.
Delete debug message.