Adding basic tests, fixing really obvious errors