Refactoring scripts and add phpcs.sh