Pretty simple stuff. Keep in mind while renaming files...
if you wish to change a file (say, w.php) then search chat.php for the string "w.php", and everywhere that occurs change it to the new filename you created.