PSR-2 fixes plus whitespace removal

Applied @samdark 's coding-standard .jar, plus some whitespace removal from CSniffer and PSR-2 compliance fixes.