Track style rewrite

This is a rewrite of #447 by @pnorman.

This resolves #136 and #446.