separate js ui from php files