Do not use hard coded values, code clean-up.

Declare MAX_SPOTS and use it where it applies.