Removing unnecessary newline char at the end
Adding merge function in background
Adding complete merge functionality