phpcs and other fixes