Converted isValidLibrary to a static method.

This is for #33 as the function is also used during merging.
Fixed syntax of documentation.
Made isValidLibrary a static function.
Added merger.

This is for #33.