Move common code from GET/POST to beginning of view [MJ-252]