This is the actual code, beyond just the little test piece.