Updated docstrings, moved *_testlib to /tests/modularinput/, general code cleanup