Use getters.

Use getter method calls instead of property call.
Bug fixes.