Added 'public' modifier where needed, fixed enum throwing cast error