Fix options handling, make process=1 work back-compatibly, break out isValidPost and handleButtons