Add unpick and do some refractoring