Move generic method outside of class.

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