Cleaned up code with drupal coding standard from PAReview.