Rewrite setup.sh
Refactor PHP code
Add LICENSE.txt
Refine directory structure