Fix whitespace issues, remove unnecessary window array lookup