moved all php functions (as opposed to pages the user sees into scripts/functions/)