Adding tests and such (not finished)