Updates for PSR2

Makes the lib psr2 compliant, minus the lack of a namespace. Tested with phpcs.