Cleaned up cut code