Cleanup some messy code

Signed-off-by: crynobone <crynobone@gmail.com>
Add code sniffer using PSR-1 standard

Signed-off-by: crynobone <crynobone@gmail.com>