Fix layer colors setting with proper casting.

Cast colors to AnyObject.

Includes minor style cleanup.