Fixed syntax errors

Two errors:
- Code outside of functions (moved into the __construct function)
- Missing comma
Updated formatting

Consistent formatting throughout.
Update README.md
Merge pull request #1 from Smenus/master

Fixed syntax errors and reformatted