Refectoring code to match PSR-2 coding standard, and adding Code Style Check to Travis