It works, but needs more neates. Revert to this if neatness breaks.