Fixed issue 4; initial work on issue 5.