Fix indentation and code in test_lib