Merged nicks changes added main loop, defined memory.