Refactor magic methods.

Signed-off-by: crynobone <crynobone@gmail.com>
Small cleanup.

Signed-off-by: crynobone <crynobone@gmail.com>
Merge branch '2.1'