ESP and minor fixes