Adding tests, and adding functionality