Refactored references_helper
Fixed indentation