Move some methods to extension method.