Added semicolons, removed ternary, fixed @params