Simplify; in part from Alex Stangl