Code changes for Milestone2

See completed issues for more details