Improved some code.