Added unit tests for QTL mapping and changed structure of mapping code.