Improve the implementation a tad bit.