add buffer yanking, clean up input functions