Added parts 1-4. Still need to add tests to 3 and implement 4