MOD: refactor some methods.