More bug fixes and initial production code