Replace all asInstanceOfs with pattern matching. Minor cleanup.
Replace Unit = functions with idiomatic formatting
Limit scope of implicit conversions
Clean up primitive declarations
Make Turtle type casting more explicit