Improve code a bit.