Alpha Code part 2

Start at line 1058.