Simplified version

Simplified version using CALayer borderWidth instead of two layers.