rx_extract_hives: Clean up codebase