Reorganized directories. Fixed a lot of PHP bugs. (Still learning it.)