Fix code styling

Refactor with PSR1/PSR2 rules
Fix code styling

Refactor with PSR1/PSR2 rules. Need to explode class into separate files