refactor css, js and php