Refactor code out of the actual methods, just keep zval stuffz there