Code formatting

Formatted all files to Wordpress standards and added comments to
classes and functions