Added all php functions into one file for organization