minor changes, reorder properties for convenience
use immutable collections instead of mutable