Delete unnecessary files and update sql commands