Updated if statements and meta extraction