fixing indentation, adding a few TODOs, renamed compile_catalog to get_catalog