Renamed some hasattr -> getattr
Added initialize_site_collection