Fixes broken enums and adds tests