Added a testfile to easily test the functionality of the code.
Added some explanatory comments.