Homoclinic snaking: structure and stability.