namespaced enums

ref #123

Tests pass with `#![allow(deprecated)]`, I am not sure how to fix that one.