remove PHP dependency, move all JS to external file