Added new functions for handling new site and existing site.