Base code for LD30.