refactor files structures and change html to php