Properties

Use properties while keeping direct variable access when performance is important.

The same principle could be used across all the library. First discussed in #118.