Refactor magic methods

* Move magic methods into its own module
* Move python values into its own module