• Add metadata
• Remove an if block to simplify code
• Further simplify if block