Code golf, general simplification

Don't merge this yet - I think it works, but I'm not sure yet.

This is an excellent code warmup!