Problems 1-3 (mostly done)

the only things missing are philosophy and tests.