Added loading functionality.