Refactored code

Moved the function to a folder so that tests will fit;
Removed output from the function file.
Added tests for merge function