PSR-2 Update + Bug Fixes

Style adjustments to meet PSR-2 formatting. Fixed small syntax issues.