Fixed bug resulting from result being overwritten in process instead of creating a new instance.
Code cleanup.