Communicated more of how the program works.

Named more of the PHP functionality with functions. Re-organized the functions into files.