Changed phpcs variable validation, some code cleanups after that.