Adds remaining fixes for stage 1 and stage 2.