Update method comments
Remove php close tag
Fix dynamic variable creation