Remove self-executing anonymous function inside load method