PSR-1 and PSR-2 formatting; clean up SQL schema