Beginning process of clearing implementation

Startings of the clearing process implemented using the pre-existing
code for recognition. Just an intermediate step, but hopefully the
puzzle should clear properly soon.