Allow for a dynamic end to be used.
Copy value of 'start' once it has had a change to be merged.
Made getEnd method to always choose the correct end variable.
Made more memory friendly.
Reduced duplicate code.