Updated code with new version

Fixed some minor issues, and updated code to match WP plugin site.