fixing phpcs errors and warnings, more documentation