Some more phpcs cleanup, data validation etc