Refactored to properly use EcmaScript 5 accessors.

Closes #14.