Initial batch of changes for homework2. Basically, we will be reusing part of homework1