Use opaque types and accessors for layers

This better mirrors the style of the Pebble SDK