reorganized js + added modal jquery-ui