remove json
clarified if/then/else
refactor for spring mvc + rythm