Cleaned some code. Verified compatibility with WP 4.0.

Cleaned some code. Verified compatibility with WordPress 4.0.