Refactor comments and docstrings.
Put log message where it better fits the context.
Remove the `morph()' method because it is no longer used.
Delete `randomSample()' because it is no longer used.
Refactor docstrings, comments and code indentation.