Added resize functionality.