Jm/csta

The giant merge of jm/csta into master.  This will probably require a bit of cleanup though most individual commits were already reviewed.
Constants required