Refactored chop, and cleaned up some other minor issues