First part of program loading