Removed unnecessary properties; refactored them into local variables.