Made fields read-only.

Applied the first step for #2.