restructured directories and created single js and php function files