Fixed #calculate_slope. Using #catalog to handle all dependencies.