Removed non-reused 'Class' definition.
Changed Tile and Utils from global to local.

Tile and Utils are not reused.
  Moved their definitions into inner functions.
Cleared the global name-space.

Wrapped everything in an anonymous function call.
Refactored styles to simplify definitions.

Instead of manually calculating left-top values,
  add margins to panel buttons, so they know their own borders.
Instead of left-top values,
  use right-bottom when it requires less calculation.