Moved tests to test file.
Moved remaining tests in lib file to ERT.
Added Gnu license texts.