Updated version including a few tests