Added tests, fixed some classes, big huge commit.