I think the trouble with the freezing is due to scratch's click detection being a bit slow and some inefficient programming on my part. Thanks for the advice!