Code cleanup

The cleanup is based on [WordPress's coding standards](http://make.wordpress.org/core/handbook/coding-standards/php/). I also added some PHP DocBlock comments for the methods and removed some system files that shouldn't have been committed.