Fix parenthesis requirements, add -flto for link optimization