Refactored to improve draw speed.