Use methods rather than field access.
Fix code style