Fixed wrong $this usage, Removed php closing tag

Thank you for this tool. Just provided some fixes.