diff --git a/CHANGELOG.md b/CHANGELOG.md
index c434e06edc31c49e1a16d009a552be7287ed378c..992f4a754b154c849771fe4aa647aa94fa2e9b1a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ Note that since we don't clearly distinguish between a public and private interf
 
 - `meshes` extension: Fixed a bug in mesh visualization (show backfaces when opacity < 1)
 - Add color quick select control to Volume controls
+- Fix `dropFiles` bug
+- Fix some cyclic imports and reduce the use of const enums. This should make it easier to use the library with the `isolatedModules: true` TS config.
 - Fix `dropFiles` bug (#679)
 - Add `input type='color'` picker to `CombinedColorControl`
 - Set `ParameterMappingControl` disabled when state is updating
diff --git a/src/extensions/cellpack/data.ts b/src/extensions/cellpack/data.ts
index 6764ddc7faaebcfeda0f9dc9c128fae3c8be629b..41522f136f0bce056995bcb509360d13b2ce9e35 100644
--- a/src/extensions/cellpack/data.ts
+++ b/src/extensions/cellpack/data.ts
@@ -52,7 +52,7 @@ export interface Compartment {
 }
 
 // Primitives discribing a compartment
-export const enum CompartmentPrimitiveType {
+export enum CompartmentPrimitiveType {
     MetaBall = 0,
     Sphere = 1,
     Cube = 2,
diff --git a/src/mol-canvas3d/helper/camera-helper.ts b/src/mol-canvas3d/helper/camera-helper.ts
index 4d26b81cef78d05e20a8869701220a3e08115c53..facc81a7af2a0d03988e773f3fed58c417cc40cf 100644
--- a/src/mol-canvas3d/helper/camera-helper.ts
+++ b/src/mol-canvas3d/helper/camera-helper.ts
@@ -135,7 +135,7 @@ export class CameraHelper {
     }
 }
 
-export const enum CameraHelperAxis {
+export enum CameraHelperAxis {
     None = 0,
     X,
     Y,
diff --git a/src/mol-canvas3d/helper/interaction-events.ts b/src/mol-canvas3d/helper/interaction-events.ts
index 48e6c13ba67107524620e63400e708c08abd9d43..30145c9518d493eee6a7498a9fb96c33c3e70872 100644
--- a/src/mol-canvas3d/helper/interaction-events.ts
+++ b/src/mol-canvas3d/helper/interaction-events.ts
@@ -19,7 +19,7 @@ type HoverEvent = import('../canvas3d').Canvas3D.HoverEvent
 type DragEvent = import('../canvas3d').Canvas3D.DragEvent
 type ClickEvent = import('../canvas3d').Canvas3D.ClickEvent
 
-const enum InputEvent { Move, Click, Drag }
+enum InputEvent { Move, Click, Drag }
 
 const tmpPosA = Vec3();
 const tmpPos = Vec3();
diff --git a/src/mol-data/db/column.ts b/src/mol-data/db/column.ts
index c65d7552b6553d7393bfb8a0c4e16343784e4f23..3120b6a479e882b33dcf1246aa36b20c175b1000 100644
--- a/src/mol-data/db/column.ts
+++ b/src/mol-data/db/column.ts
@@ -93,20 +93,35 @@ namespace Column {
         return !!v && !!(v as Column<any>).schema && !!(v as Column<any>).value;
     }
 
-    export const enum ValueKind {
+    // Value kinds are accessed very of often
+    // Using a const enum is an internal optimization and is defined separately to better support
+    // compiling with isolatedModules flag in 3rd party use-cases of Mol*.
+    export const enum ValueKinds {
+        /** Defined value (= 0) */
         Present = 0,
-        /** Expressed in CIF as `.` */
+        /** Expressed in CIF as `.` (= 1) */
         NotPresent = 1,
-        /** Expressed in CIF as `?` */
+        /** Expressed in CIF as `?` (= 2) */
         Unknown = 2
     }
 
+    export const ValueKind = {
+        /** Defined value (= 0) */
+        Present: ValueKinds.Present,
+        /** Expressed in CIF as `.` (= 1) */
+        NotPresent: ValueKinds.NotPresent,
+        /** Expressed in CIF as `?` (= 2) */
+        Unknown: ValueKinds.Unknown
+    } as const;
+    export type ValueKind = (typeof ValueKind)[keyof typeof ValueKinds];
+
+
     export function Undefined<T extends Schema>(rowCount: number, schema: T): Column<T['T']> {
-        return constColumn(schema['T'], rowCount, schema, ValueKind.NotPresent);
+        return constColumn(schema['T'], rowCount, schema, ValueKinds.NotPresent);
     }
 
     export function ofConst<T extends Schema>(v: T['T'], rowCount: number, type: T): Column<T['T']> {
-        return constColumn(v, rowCount, type, ValueKind.Present);
+        return constColumn(v, rowCount, type, ValueKinds.Present);
     }
 
     export function ofLambda<T extends Schema>(spec: LambdaSpec<T>): Column<T['T']> {
@@ -256,7 +271,7 @@ function constColumn<T extends Column.Schema>(v: T['T'], rowCount: number, schem
     return {
         schema: schema,
         __array: void 0,
-        isDefined: valueKind === Column.ValueKind.Present,
+        isDefined: valueKind === Column.ValueKinds.Present,
         rowCount,
         value,
         valueKind: row => valueKind,
@@ -276,7 +291,7 @@ function lambdaColumn<T extends Column.Schema>({ value, valueKind, areValuesEqua
         isDefined: true,
         rowCount,
         value,
-        valueKind: valueKind ? valueKind : row => Column.ValueKind.Present,
+        valueKind: valueKind ? valueKind : row => Column.ValueKinds.Present,
         toArray: params => {
             const { array, start } = ColumnHelpers.createArray(rowCount, params);
             for (let i = 0, _i = array.length; i < _i; i++) array[i] = value(i + start);
@@ -304,7 +319,7 @@ function arrayColumn<T extends Column.Schema>({ array, schema, valueKind }: Colu
         isDefined: true,
         rowCount,
         value,
-        valueKind: valueKind ? valueKind : row => Column.ValueKind.Present,
+        valueKind: valueKind ? valueKind : row => Column.ValueKinds.Present,
         toArray: schema.valueType === 'str'
             ? (schema as Column.Schema.Str).transform === 'lowercase'
                 ? params => {
diff --git a/src/mol-data/db/table.ts b/src/mol-data/db/table.ts
index cc0ed0258f8b09a4be78312187a5d34084df620f..5545c0fd9d2a8c635eb1a66a0e7d132afb388624 100644
--- a/src/mol-data/db/table.ts
+++ b/src/mol-data/db/table.ts
@@ -85,7 +85,7 @@ namespace Table {
                 rowCount,
                 schema: schema[k],
                 value: r => rows[r][k],
-                valueKind: r => typeof rows[r][k] === 'undefined' ? Column.ValueKind.NotPresent : Column.ValueKind.Present
+                valueKind: r => typeof rows[r][k] === 'undefined' ? Column.ValueKinds.NotPresent : Column.ValueKinds.Present
             });
         }
         return ret as R;
@@ -267,7 +267,7 @@ namespace Table {
             StringBuilder.write(sb, '|');
             for (let i = 0; i < cols.length; i++) {
                 const c = table[cols[i]];
-                if (c.valueKind(r) === Column.ValueKind.Present) {
+                if (c.valueKind(r) === Column.ValueKinds.Present) {
                     StringBuilder.write(sb, c.value(r));
                     StringBuilder.write(sb, '|');
                 } else {
diff --git a/src/mol-gl/renderer.ts b/src/mol-gl/renderer.ts
index c41bf3283e32076853c8e4923fa59702b0364b87..1b7cb22b67cca34da17bd07f1e129ace1706bc3c 100644
--- a/src/mol-gl/renderer.ts
+++ b/src/mol-gl/renderer.ts
@@ -38,14 +38,14 @@ export interface RendererStats {
     instancedDrawCount: number
 }
 
-export const enum PickType {
+export enum PickType {
     None = 0,
     Object = 1,
     Instance = 2,
     Group = 3,
 }
 
-export const enum MarkingType {
+export enum MarkingType {
     None = 0,
     Depth = 1,
     Mask = 2,
diff --git a/src/mol-io/common/binary-cif/encoding.ts b/src/mol-io/common/binary-cif/encoding.ts
index f69792b55aadd7e79b4965b4a63d2118f0cc080d..21d5511e20fd4cf5fd771067010f90cf02f720b4 100644
--- a/src/mol-io/common/binary-cif/encoding.ts
+++ b/src/mol-io/common/binary-cif/encoding.ts
@@ -57,7 +57,7 @@ export interface EncodedData {
 
 export namespace Encoding {
 
-    export const enum IntDataType {
+    export enum IntDataType {
         Int8 = 1,
         Int16 = 2,
         Int32 = 3,
@@ -66,7 +66,7 @@ export namespace Encoding {
         Uint32 = 6,
     }
 
-    export const enum FloatDataType {
+    export enum FloatDataType {
         Float32 = 32,
         Float64 = 33
     }
diff --git a/src/mol-io/reader/_spec/common.spec.ts b/src/mol-io/reader/_spec/common.spec.ts
index ba94d4694418042c66f0d50c16381f39b58cd7c4..a237a87e2afe7c16318cd2babc4d6324a10b55b1 100644
--- a/src/mol-io/reader/_spec/common.spec.ts
+++ b/src/mol-io/reader/_spec/common.spec.ts
@@ -4,7 +4,7 @@
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
 
-import { parseFloat as fastParseFloat, parseInt as fastParseInt, getNumberType, NumberType } from '../../../mol-io/reader/common/text/number-parser';
+import { parseFloat as fastParseFloat, parseInt as fastParseInt, getNumberType, NumberTypes } from '../../../mol-io/reader/common/text/number-parser';
 
 describe('common', () => {
     it('number-parser fastParseFloat', () => {
@@ -24,17 +24,17 @@ describe('common', () => {
     });
 
     it('number-parser getNumberType', () => {
-        expect(getNumberType('11')).toBe(NumberType.Int);
-        expect(getNumberType('5E93')).toBe(NumberType.Scientific);
-        expect(getNumberType('0.42')).toBe(NumberType.Float);
-        expect(getNumberType('Foo123')).toBe(NumberType.NaN);
-        expect(getNumberType('11.0829(23)')).toBe(NumberType.NaN);
-        expect(getNumberType('1..2')).toBe(NumberType.NaN);
-        expect(getNumberType('.')).toBe(NumberType.NaN);
-        expect(getNumberType('-.')).toBe(NumberType.NaN);
-        expect(getNumberType('e')).toBe(NumberType.NaN);
-        expect(getNumberType('-e')).toBe(NumberType.NaN);
-        expect(getNumberType('1e')).toBe(NumberType.Scientific);
-        expect(getNumberType('-1e')).toBe(NumberType.Scientific);
+        expect(getNumberType('11')).toBe(NumberTypes.Int);
+        expect(getNumberType('5E93')).toBe(NumberTypes.Scientific);
+        expect(getNumberType('0.42')).toBe(NumberTypes.Float);
+        expect(getNumberType('Foo123')).toBe(NumberTypes.NaN);
+        expect(getNumberType('11.0829(23)')).toBe(NumberTypes.NaN);
+        expect(getNumberType('1..2')).toBe(NumberTypes.NaN);
+        expect(getNumberType('.')).toBe(NumberTypes.NaN);
+        expect(getNumberType('-.')).toBe(NumberTypes.NaN);
+        expect(getNumberType('e')).toBe(NumberTypes.NaN);
+        expect(getNumberType('-e')).toBe(NumberTypes.NaN);
+        expect(getNumberType('1e')).toBe(NumberTypes.Scientific);
+        expect(getNumberType('-1e')).toBe(NumberTypes.Scientific);
     });
 });
\ No newline at end of file
diff --git a/src/mol-io/reader/cif/binary/field.ts b/src/mol-io/reader/cif/binary/field.ts
index e80a5852ffcc5fb544ab552d4ac704f1060e70e6..892001ebec60fdc21d33a83edef4c47cfd954583 100644
--- a/src/mol-io/reader/cif/binary/field.ts
+++ b/src/mol-io/reader/cif/binary/field.ts
@@ -17,10 +17,10 @@ export function Field(column: EncodedColumn): Data.CifField {
 
     const str: Data.CifField['str'] = isNumeric
         ? mask
-            ? row => mask[row] === Column.ValueKind.Present ? '' + data[row] : ''
+            ? row => mask[row] === Column.ValueKinds.Present ? '' + data[row] : ''
             : row => '' + data[row]
         : mask
-            ? row => mask[row] === Column.ValueKind.Present ? data[row] : ''
+            ? row => mask[row] === Column.ValueKinds.Present ? data[row] : ''
             : row => data[row];
 
     const int: Data.CifField['int'] = isNumeric
@@ -32,8 +32,8 @@ export function Field(column: EncodedColumn): Data.CifField {
         : row => { const v = data[row]; return fastParseFloat(v, 0, v.length); };
 
     const valueKind: Data.CifField['valueKind'] = mask
-        ? row => mask[row]
-        : row => Column.ValueKind.Present;
+        ? row => mask[row] as Column.ValueKind
+        : row => Column.ValueKinds.Present;
 
     const rowCount = data.length;
 
diff --git a/src/mol-io/reader/cif/data-model.ts b/src/mol-io/reader/cif/data-model.ts
index af9a713cd185af54ff8b239279ab330715f03d90..b5adb854d75b5e890e6984d5d0ca59e5a2420601 100644
--- a/src/mol-io/reader/cif/data-model.ts
+++ b/src/mol-io/reader/cif/data-model.ts
@@ -7,7 +7,7 @@
 
 import { Column, ColumnHelpers, Table } from '../../../mol-data/db';
 import { Tensor } from '../../../mol-math/linear-algebra';
-import { getNumberType, NumberType, parseInt as fastParseInt, parseFloat as fastParseFloat } from '../common/text/number-parser';
+import { getNumberType, NumberTypes, parseInt as fastParseInt, parseFloat as fastParseFloat } from '../common/text/number-parser';
 import { Encoding } from '../../common/binary-cif';
 import { Tokens } from '../common/text/tokenizer';
 import { areValuesEqualProvider } from '../common/text/column/token';
@@ -124,12 +124,12 @@ export namespace CifField {
         const float: CifField['float'] = row => { const v = values[row]; return fastParseFloat(v, 0, v.length) || 0; };
         const valueKind: CifField['valueKind'] = row => {
             const v = values[row], l = v.length;
-            if (l > 1) return Column.ValueKind.Present;
-            if (l === 0) return Column.ValueKind.NotPresent;
+            if (l > 1) return Column.ValueKinds.Present;
+            if (l === 0) return Column.ValueKinds.NotPresent;
             const c = v.charCodeAt(0);
-            if (c === 46 /* . */) return Column.ValueKind.NotPresent;
-            if (c === 63 /* ? */) return Column.ValueKind.Unknown;
-            return Column.ValueKind.Present;
+            if (c === 46 /* . */) return Column.ValueKinds.NotPresent;
+            if (c === 63 /* ? */) return Column.ValueKinds.Unknown;
+            return Column.ValueKinds.Present;
         };
 
         return {
@@ -152,7 +152,7 @@ export namespace CifField {
         const rowCount = values.length;
         const str: CifField['str'] = row => { return '' + values[row]; };
         const float: CifField['float'] = row => values[row];
-        const valueKind: CifField['valueKind'] = row => Column.ValueKind.Present;
+        const valueKind: CifField['valueKind'] = row => Column.ValueKinds.Present;
 
         const toFloatArray = (params: Column.ToArrayParams<number>) => {
             if (!params || params.array && values instanceof params.array) {
@@ -197,12 +197,12 @@ export namespace CifField {
 
         const valueKind: CifField['valueKind'] = row => {
             const s = indices[2 * row], l = indices[2 * row + 1] - s;
-            if (l > 1) return Column.ValueKind.Present;
-            if (l === 0) return Column.ValueKind.NotPresent;
+            if (l > 1) return Column.ValueKinds.Present;
+            if (l === 0) return Column.ValueKinds.NotPresent;
             const v = data.charCodeAt(s);
-            if (v === 46 /* . */) return Column.ValueKind.NotPresent;
-            if (v === 63 /* ? */) return Column.ValueKind.Unknown;
-            return Column.ValueKind.Present;
+            if (v === 46 /* . */) return Column.ValueKinds.NotPresent;
+            if (v === 63 /* ? */) return Column.ValueKinds.Unknown;
+            return Column.ValueKinds.Present;
         };
 
         return {
@@ -328,13 +328,13 @@ export function getCifFieldType(field: CifField): Column.Schema.Int | Column.Sch
     let floatCount = 0, hasStringOrScientific = false, undefinedCount = 0;
     for (let i = 0, _i = field.rowCount; i < _i; i++) {
         const k = field.valueKind(i);
-        if (k !== Column.ValueKind.Present) {
+        if (k !== Column.ValueKinds.Present) {
             undefinedCount++;
             continue;
         }
         const type = getNumberType(field.str(i));
-        if (type === NumberType.Int) continue;
-        else if (type === NumberType.Float) floatCount++;
+        if (type === NumberTypes.Int) continue;
+        else if (type === NumberTypes.Float) floatCount++;
         else { hasStringOrScientific = true; break; }
     }
 
diff --git a/src/mol-io/reader/cif/schema.ts b/src/mol-io/reader/cif/schema.ts
index d5d809d139e7b00a987f2fe3d6bfe30fd94686bb..305e5f6df18c0d883bdbb66a186ebade54cad48e 100644
--- a/src/mol-io/reader/cif/schema.ts
+++ b/src/mol-io/reader/cif/schema.ts
@@ -101,7 +101,7 @@ function createListColumn<T extends number | string>(schema: Column.Schema.List<
         isDefined: !!f,
         rowCount: category.rowCount,
         value,
-        valueKind: f ? f.valueKind : () => Column.ValueKind.NotPresent,
+        valueKind: f ? f.valueKind : () => Column.ValueKinds.NotPresent,
         areValuesEqual: (rowA, rowB) => arrayEqual(value(rowA), value(rowB)),
         toArray
     };
diff --git a/src/mol-io/reader/common/text/column/fixed.ts b/src/mol-io/reader/common/text/column/fixed.ts
index c1bea2da4ea51bab08adc60c8bdec275b0959017..bebf4ca7ddf467e6351bf4d7534afb039cd47dd4 100644
--- a/src/mol-io/reader/common/text/column/fixed.ts
+++ b/src/mol-io/reader/common/text/column/fixed.ts
@@ -39,7 +39,7 @@ export function FixedColumn<T extends Column.Schema>(lines: Tokens, offset: numb
         isDefined: true,
         rowCount,
         value,
-        valueKind: row => Column.ValueKind.Present,
+        valueKind: row => Column.ValueKinds.Present,
         toArray: params => ColumnHelpers.createAndFillArray(rowCount, value, params),
         areValuesEqual: (rowA, rowB) => value(rowA) === value(rowB)
     };
diff --git a/src/mol-io/reader/common/text/column/token.ts b/src/mol-io/reader/common/text/column/token.ts
index 8560c80ecb6968d00d9679ebeebde7384c17fa31..1026a0221f7935a1fe37254427b085b5d672cf24 100644
--- a/src/mol-io/reader/common/text/column/token.ts
+++ b/src/mol-io/reader/common/text/column/token.ts
@@ -32,7 +32,7 @@ export function TokenColumn<T extends Column.Schema>(tokens: Tokens, schema: T):
         isDefined: true,
         rowCount,
         value,
-        valueKind: row => Column.ValueKind.Present,
+        valueKind: row => Column.ValueKinds.Present,
         toArray: params => ColumnHelpers.createAndFillArray(rowCount, value, params),
         areValuesEqual: areValuesEqualProvider(tokens)
     };
diff --git a/src/mol-io/reader/common/text/number-parser.ts b/src/mol-io/reader/common/text/number-parser.ts
index a38e5a1d0a2b445b5c0ad8d1c38d9350cef53b6e..67d38360426e74da6f11c1520770265e6c8990f0 100644
--- a/src/mol-io/reader/common/text/number-parser.ts
+++ b/src/mol-io/reader/common/text/number-parser.ts
@@ -87,13 +87,21 @@ export function parseFloat(str: string, start: number, end: number) {
     return neg * ret;
 }
 
-export const enum NumberType {
-    Int,
-    Float,
-    Scientific,
-    NaN
+export const enum NumberTypes {
+    Int = 0,
+    Float = 1,
+    Scientific = 2,
+    NaN = 3
 }
 
+export const NumberType = {
+    Int: NumberTypes.Int,
+    Float: NumberTypes.Float,
+    Scientific: NumberTypes.Scientific,
+    NaN: NumberTypes.NaN
+} as const;
+export type NumberType = (typeof NumberType)[keyof typeof NumberType];
+
 function isInt(str: string, start: number, end: number) {
     if (str.charCodeAt(start) === 45 /* - */) { start++; }
     for (; start < end; start++) {
@@ -107,7 +115,7 @@ function isInt(str: string, start: number, end: number) {
 function getNumberTypeScientific(str: string, start: number, end: number) {
     // handle + in '1e+1' separately.
     if (str.charCodeAt(start) === 43 /* + */) start++;
-    return isInt(str, start, end) ? NumberType.Scientific : NumberType.NaN;
+    return isInt(str, start, end) ? NumberTypes.Scientific : NumberTypes.NaN;
 }
 
 /** The whole range must match, otherwise returns NaN */
@@ -121,7 +129,7 @@ export function getNumberType(str: string): NumberType {
 
     // string is . or -.
     if (str.charCodeAt(start) === 46 && end - start === 1) {
-        return NumberType.NaN;
+        return NumberTypes.NaN;
     }
 
     while (start < end) {
@@ -139,18 +147,18 @@ export function getNumberType(str: string): NumberType {
                 } else if (c === 53 || c === 21) { // 'e'/'E'
                     return getNumberTypeScientific(str, start + 1, end);
                 } else {
-                    return NumberType.NaN;
+                    return NumberTypes.NaN;
                 }
             }
-            return hasDigit ? NumberType.Float : NumberType.Int;
+            return hasDigit ? NumberTypes.Float : NumberTypes.Int;
         } else if (c === 53 || c === 21) { // 'e'/'E'
             if (start === 0 || start === 1 && str.charCodeAt(0) === 45) {
-                return NumberType.NaN; // string starts with e/E or -e/-E
+                return NumberTypes.NaN; // string starts with e/E or -e/-E
             }
             return getNumberTypeScientific(str, start + 1, end);
         } else {
             break;
         }
     }
-    return start === end ? NumberType.Int : NumberType.NaN;
+    return start === end ? NumberTypes.Int : NumberTypes.NaN;
 }
diff --git a/src/mol-io/writer/cif/encoder/binary.ts b/src/mol-io/writer/cif/encoder/binary.ts
index 9222e22b7aac95c546dbbdeb49ab7f55bb276531..43d66a301a2df13a510d49af6f702ebca2c8fea8 100644
--- a/src/mol-io/writer/cif/encoder/binary.ts
+++ b/src/mol-io/writer/cif/encoder/binary.ts
@@ -184,8 +184,8 @@ function getFieldData(field: Field<any, any>, arrayCtor: ArrayCtor<string | numb
         const keys = data[_d].keys();
         while (keys.hasNext) {
             const key = keys.move();
-            const p = valueKind ? valueKind(key, d) : Column.ValueKind.Present;
-            if (p !== Column.ValueKind.Present) {
+            const p = valueKind ? valueKind(key, d) : Column.ValueKinds.Present;
+            if (p !== Column.ValueKinds.Present) {
                 mask[offset] = p;
                 if (isStr)
                     array[offset] = '';
@@ -193,10 +193,10 @@ function getFieldData(field: Field<any, any>, arrayCtor: ArrayCtor<string | numb
             } else {
                 const value = getter(key, d, offset);
                 if (typeof value === 'string' && !value) {
-                    mask[offset] = Column.ValueKind.NotPresent;
+                    mask[offset] = Column.ValueKinds.NotPresent;
                     allPresent = false;
                 } else {
-                    mask[offset] = Column.ValueKind.Present;
+                    mask[offset] = Column.ValueKinds.Present;
                 }
                 array[offset] = value;
             }
diff --git a/src/mol-io/writer/cif/encoder/text.ts b/src/mol-io/writer/cif/encoder/text.ts
index 8603bb10afdf1db777443df58ddf163468ea1698..8840a72f01fb56fdfcfd3194af7d3b353a88c5f4 100644
--- a/src/mol-io/writer/cif/encoder/text.ts
+++ b/src/mol-io/writer/cif/encoder/text.ts
@@ -82,9 +82,9 @@ export class TextEncoder implements Encoder<string> {
 
 function writeValue(builder: StringBuilder, data: any, key: any, f: Field<any, any>, floatPrecision: number, index: number): boolean {
     const kind = f.valueKind;
-    const p = kind ? kind(key, data) : Column.ValueKind.Present;
-    if (p !== Column.ValueKind.Present) {
-        if (p === Column.ValueKind.NotPresent) writeNotPresent(builder);
+    const p = kind ? kind(key, data) : Column.ValueKinds.Present;
+    if (p !== Column.ValueKinds.Present) {
+        if (p === Column.ValueKinds.NotPresent) writeNotPresent(builder);
         else writeUnknown(builder);
     } else {
         const val = f.value(key, data, index);
diff --git a/src/mol-model-formats/structure/basic/atomic.ts b/src/mol-model-formats/structure/basic/atomic.ts
index 8f9cda30a2e9b02670da1a6fb882faf0006ded6e..ed58a4296204cd8094dd7eba24627d4be72ec2e1 100644
--- a/src/mol-model-formats/structure/basic/atomic.ts
+++ b/src/mol-model-formats/structure/basic/atomic.ts
@@ -111,13 +111,13 @@ function createChainOperatorMappingAndSubstituteNames(hierarchy: AtomicData, for
     const authMap = new Map<string, string>();
 
     for (let i = 0; i < entries._rowCount; i++) {
-        const assembly: SymmetryOperator['assembly'] = entries.assembly_operator_id.valueKind(i) === Column.ValueKind.Present
+        const assembly: SymmetryOperator['assembly'] = entries.assembly_operator_id.valueKind(i) === Column.ValueKinds.Present
             ? { id: entries.assembly_id.value(i), operList: [], operId: entries.assembly_operator_id.value(i) }
             : void 0;
 
         const operator = SymmetryOperator.create(entries.operator_name.value(i), Mat4.identity(), {
             assembly,
-            spgrOp: entries.symmetry_operator_index.valueKind(i) === Column.ValueKind.Present ? entries.symmetry_operator_index.value(i) : void 0,
+            spgrOp: entries.symmetry_operator_index.valueKind(i) === Column.ValueKinds.Present ? entries.symmetry_operator_index.value(i) : void 0,
             hkl: Vec3.ofArray(entries.symmetry_hkl.value(i)),
             ncsId: entries.ncs_id.value(i)
         });
diff --git a/src/mol-model-formats/structure/basic/parser.ts b/src/mol-model-formats/structure/basic/parser.ts
index cc1b53ffb2c930a4e0a27646cb0b62b441c2a5a5..eca95e3a07bacc64caa8c53625bdb6806828fd27 100644
--- a/src/mol-model-formats/structure/basic/parser.ts
+++ b/src/mol-model-formats/structure/basic/parser.ts
@@ -65,12 +65,12 @@ function createStandardModel(data: BasicData, atom_site: AtomSite, sourceIndex:
     const atomicRanges = getAtomicRanges(atomic.hierarchy, entities, atomic.conformation, sequence);
     const structAsymMap = getStructAsymMap(atomic.hierarchy);
 
-    const entry = data.entry.id.valueKind(0) === Column.ValueKind.Present
+    const entry = data.entry.id.valueKind(0) === Column.ValueKinds.Present
         ? data.entry.id.value(0) : format.name;
 
     const label: string[] = [];
     if (entry) label.push(entry);
-    if (data.struct.title.valueKind(0) === Column.ValueKind.Present) label.push(data.struct.title.value(0));
+    if (data.struct.title.valueKind(0) === Column.ValueKinds.Present) label.push(data.struct.title.value(0));
 
     return {
         id: UUID.create22(),
@@ -105,12 +105,12 @@ function createIntegrativeModel(data: BasicData, ihm: CoarseData, properties: Co
     const sequence = getSequence(data, ihm.entities, atomic.hierarchy, coarse.hierarchy);
     const atomicRanges = getAtomicRanges(atomic.hierarchy, ihm.entities, atomic.conformation, sequence);
 
-    const entry = data.entry.id.valueKind(0) === Column.ValueKind.Present
+    const entry = data.entry.id.valueKind(0) === Column.ValueKinds.Present
         ? data.entry.id.value(0) : format.name;
 
     const label: string[] = [];
     if (entry) label.push(entry);
-    if (data.struct.title.valueKind(0) === Column.ValueKind.Present) label.push(data.struct.title.value(0));
+    if (data.struct.title.valueKind(0) === Column.ValueKinds.Present) label.push(data.struct.title.value(0));
     if (ihm.model_name) label.push(ihm.model_name);
     if (ihm.model_group_name) label.push(ihm.model_group_name);
 
diff --git a/src/mol-model-formats/structure/basic/sort.ts b/src/mol-model-formats/structure/basic/sort.ts
index c5fe5cd4084763c24d2073c968a0655a404eac28..3968dc277aafd322455f2d334db82cdffcc8d54d 100644
--- a/src/mol-model-formats/structure/basic/sort.ts
+++ b/src/mol-model-formats/structure/basic/sort.ts
@@ -26,7 +26,7 @@ export async function sortAtomSite(ctx: RuntimeContext, atom_site: AtomSite, sta
         for (let cI = 0, _cI = chainBuckets.length - 1; cI < _cI; cI++) {
             const aI = chainBuckets[cI];
             // are we in HETATM territory?
-            if (label_seq_id.valueKind(aI) !== Column.ValueKind.Present) continue;
+            if (label_seq_id.valueKind(aI) !== Column.ValueKinds.Present) continue;
 
             makeBuckets(indices, label_seq_id.value, { sort: true, start: aI, end: chainBuckets[cI + 1] });
             if (ctx.shouldUpdate) await ctx.update();
diff --git a/src/mol-model-formats/structure/basic/util.ts b/src/mol-model-formats/structure/basic/util.ts
index 03d028e5eabef17abe8dcad6e6af90a3d44e5fb8..b5ea2424dc3055075bfcc2465946d05ccc230387 100644
--- a/src/mol-model-formats/structure/basic/util.ts
+++ b/src/mol-model-formats/structure/basic/util.ts
@@ -23,7 +23,7 @@ export function getModelGroupName(model_id: number, data: BasicData) {
 
 function hasPresentValues(column: Column<any>) {
     for (let i = 0, il = column.rowCount; i < il; i++) {
-        if (column.valueKind(i) === Column.ValueKind.Present) return true;
+        if (column.valueKind(i) === Column.ValueKinds.Present) return true;
     }
     return false;
 }
diff --git a/src/mol-model-formats/structure/property/bonds/struct_conn.ts b/src/mol-model-formats/structure/property/bonds/struct_conn.ts
index f5f38998ec4da81174f5787b5e84719dc4c52fbc..135b81b68f511bab55e254d249702e4fb4c7a618 100644
--- a/src/mol-model-formats/structure/property/bonds/struct_conn.ts
+++ b/src/mol-model-formats/structure/property/bonds/struct_conn.ts
@@ -113,7 +113,7 @@ export namespace StructConn {
 
         const entityIds = Array.from(model.entities.data.id.toArray());
         const _p = (row: number, ps: typeof p1) => {
-            if (ps.label_asym_id.valueKind(row) !== Column.ValueKind.Present) return void 0;
+            if (ps.label_asym_id.valueKind(row) !== Column.ValueKinds.Present) return void 0;
             const asymId = ps.label_asym_id.value(row);
             const atomName = ps.label_atom_id.value(row);
             // turns out "mismat" records might not have atom name value
diff --git a/src/mol-model-formats/structure/property/secondary-structure.ts b/src/mol-model-formats/structure/property/secondary-structure.ts
index 7bab0504e5555c7df58ef079c8afe5d5aacb00db..9cb946a336c3bef8be14526e86f12feb15892b35 100644
--- a/src/mol-model-formats/structure/property/secondary-structure.ts
+++ b/src/mol-model-formats/structure/property/secondary-structure.ts
@@ -54,9 +54,9 @@ namespace ModelSecondaryStructure {
 
 function getCoordinateType(conf: StructConf, sheetRange: StructSheetRange): CoordinateType {
     if (conf._rowCount > 0) {
-        if (conf.beg_label_seq_id.valueKind(0) !== Column.ValueKind.Present || conf.end_label_seq_id.valueKind(0) !== Column.ValueKind.Present) return 'auth';
+        if (conf.beg_label_seq_id.valueKind(0) !== Column.ValueKinds.Present || conf.end_label_seq_id.valueKind(0) !== Column.ValueKinds.Present) return 'auth';
     } else if (sheetRange) {
-        if (sheetRange.beg_label_seq_id.valueKind(0) !== Column.ValueKind.Present || sheetRange.end_label_seq_id.valueKind(0) !== Column.ValueKind.Present) return 'auth';
+        if (sheetRange.beg_label_seq_id.valueKind(0) !== Column.ValueKinds.Present || sheetRange.end_label_seq_id.valueKind(0) !== Column.ValueKinds.Present) return 'auth';
     }
     return 'label';
 }
@@ -83,18 +83,18 @@ function addHelices(cat: StructConf, coordinates: CoordinateType, map: Secondary
     const end_seq_id = coordinates === 'label' ? end_label_seq_id : end_auth_seq_id;
 
     for (let i = 0, _i = cat._rowCount; i < _i; i++) {
-        const type = SecondaryStructureType.create(pdbx_PDB_helix_class.valueKind(i) === Column.ValueKind.Present
+        const type = SecondaryStructureType.create(pdbx_PDB_helix_class.valueKind(i) === Column.ValueKinds.Present
             ? SecondaryStructureType.SecondaryStructurePdb[pdbx_PDB_helix_class.value(i)]
-            : conf_type_id.valueKind(i) === Column.ValueKind.Present
+            : conf_type_id.valueKind(i) === Column.ValueKinds.Present
                 ? SecondaryStructureType.SecondaryStructureMmcif[conf_type_id.value(i)]
                 : SecondaryStructureType.Flag.NA);
 
         const element: SecondaryStructure.Helix = {
             kind: 'helix',
             flags: type,
-            type_id: conf_type_id.valueKind(i) === Column.ValueKind.Present ? conf_type_id.value(i) : 'helx_p',
+            type_id: conf_type_id.valueKind(i) === Column.ValueKinds.Present ? conf_type_id.value(i) : 'helx_p',
             helix_class: pdbx_PDB_helix_class.value(i),
-            details: details.valueKind(i) === Column.ValueKind.Present ? details.value(i) : void 0
+            details: details.valueKind(i) === Column.ValueKinds.Present ? details.value(i) : void 0
         };
         const entry: SecondaryStructureEntry = {
             startSeqId: beg_seq_id.value(i),
diff --git a/src/mol-model-props/computed/accessible-surface-area.ts b/src/mol-model-props/computed/accessible-surface-area.ts
index 775e18840a71cab3246e3235d2b84f81f533c238..177ff02199c422d04c9f35c1ca2130dab1bbc04b 100644
--- a/src/mol-model-props/computed/accessible-surface-area.ts
+++ b/src/mol-model-props/computed/accessible-surface-area.ts
@@ -27,7 +27,7 @@ export const AccessibleSurfaceAreaSymbols = {
             if (!Unit.isAtomic(ctx.element.unit)) return false;
             const accessibleSurfaceArea = AccessibleSurfaceAreaProvider.get(ctx.element.structure).value;
             if (!accessibleSurfaceArea) return false;
-            return AccessibleSurfaceArea.getFlag(ctx.element, accessibleSurfaceArea) === AccessibleSurfaceArea.Flag.Buried;
+            return AccessibleSurfaceArea.getFlag(ctx.element, accessibleSurfaceArea) === AccessibleSurfaceArea.Flags.Buried;
         }
     ),
     isAccessible: QuerySymbolRuntime.Dynamic(CustomPropSymbol('computed', 'accessible-surface-area.is-accessible', Type.Bool),
@@ -35,7 +35,7 @@ export const AccessibleSurfaceAreaSymbols = {
             if (!Unit.isAtomic(ctx.element.unit)) return false;
             const accessibleSurfaceArea = AccessibleSurfaceAreaProvider.get(ctx.element.structure).value;
             if (!accessibleSurfaceArea) return false;
-            return AccessibleSurfaceArea.getFlag(ctx.element, accessibleSurfaceArea) === AccessibleSurfaceArea.Flag.Accessible;
+            return AccessibleSurfaceArea.getFlag(ctx.element, accessibleSurfaceArea) === AccessibleSurfaceArea.Flags.Accessible;
         }
     ),
 };
diff --git a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts
index 6d7259c9c4940a955cd9b7a1a2661a047f2f0cb7..c9727a796b85091a54a4b11d42b32b519a090fe6 100644
--- a/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts
+++ b/src/mol-model-props/computed/accessible-surface-area/shrake-rupley.ts
@@ -89,12 +89,19 @@ namespace AccessibleSurfaceArea {
         return points;
     }
 
-    export const enum Flag {
+    export const enum Flags {
         NA = 0x0,
         Buried = 0x1,
         Accessible = 0x2
     }
 
+    export const Flag = {
+        NA: Flags.NA,
+        Buried: Flags.Buried,
+        Accessible: Flags.Accessible
+    } as const;
+    export type Flag = (typeof Flag)[keyof typeof Flag];
+
     /** Get relative area for a given component id */
     export function normalize(compId: string, asa: number) {
         const maxAsa = MaxAsa[compId] || DefaultMaxAsa;
@@ -115,8 +122,8 @@ namespace AccessibleSurfaceArea {
 
     export function getFlag(location: StructureElement.Location, accessibleSurfaceArea: AccessibleSurfaceArea) {
         const value = getNormalizedValue(location, accessibleSurfaceArea);
-        return value === -1 ? Flag.NA :
-            value < 0.16 ? Flag.Buried :
-                Flag.Accessible;
+        return value === -1 ? Flags.NA :
+            value < 0.16 ? Flags.Buried :
+                Flags.Accessible;
     }
 }
\ No newline at end of file
diff --git a/src/mol-model-props/computed/chemistry/geometry.ts b/src/mol-model-props/computed/chemistry/geometry.ts
index 5caa0b2e993e4e484bbef28fb08c4403ecb3c2b5..36fa5466ed820c82a4c0d6966a218acc9bc0a9e8 100644
--- a/src/mol-model-props/computed/chemistry/geometry.ts
+++ b/src/mol-model-props/computed/chemistry/geometry.ts
@@ -15,7 +15,7 @@ import { Elements } from '../../../mol-model/structure/model/properties/atomic/t
  * Numbering mostly inline with coordination number from VSEPR,
  * breaks with `SquarePlanar = 7`
  */
-export const enum AtomGeometry {
+export enum AtomGeometry {
     Spherical = 0,
     Terminal = 1,
     Linear = 2,
diff --git a/src/mol-model-props/computed/interactions/common.ts b/src/mol-model-props/computed/interactions/common.ts
index 1a057a1d20593f47726da56ffa0c54d8c8ee53b1..7f149ea29ea0d310229f96f5a63d3754e88303f1 100644
--- a/src/mol-model-props/computed/interactions/common.ts
+++ b/src/mol-model-props/computed/interactions/common.ts
@@ -118,12 +118,12 @@ namespace InteractionsInterContacts {
     export type Props = { type: InteractionType, flag: InteractionFlag }
 }
 
-export const enum InteractionFlag {
+export enum InteractionFlag {
     None = 0,
     Filtered = 1,
 }
 
-export const enum InteractionType {
+export enum InteractionType {
     Unknown = 0,
     Ionic = 1,
     CationPi = 2,
@@ -175,6 +175,24 @@ export const enum FeatureType {
     IonicTypeMetal = 13
 }
 
+// to use with isolatedModules
+export enum FeatureTypes {
+    None = FeatureType.None,
+    PositiveCharge = FeatureType.PositiveCharge,
+    NegativeCharge = FeatureType.NegativeCharge,
+    AromaticRing = FeatureType.AromaticRing,
+    HydrogenDonor = FeatureType.HydrogenDonor,
+    HydrogenAcceptor = FeatureType.HydrogenAcceptor,
+    HalogenDonor = FeatureType.HalogenDonor,
+    HalogenAcceptor = FeatureType.HalogenAcceptor,
+    HydrophobicAtom = FeatureType.HydrophobicAtom,
+    WeakHydrogenDonor = FeatureType.WeakHydrogenDonor,
+    IonicTypePartner = FeatureType.IonicTypePartner,
+    DativeBondPartner = FeatureType.DativeBondPartner,
+    TransitionMetal = FeatureType.TransitionMetal,
+    IonicTypeMetal = FeatureType.IonicTypeMetal
+}
+
 export function featureTypeLabel(type: FeatureType): string {
     switch (type) {
         case FeatureType.None:
@@ -208,7 +226,7 @@ export function featureTypeLabel(type: FeatureType): string {
     }
 }
 
-export const enum FeatureGroup {
+export enum FeatureGroup {
     None = 0,
     QuaternaryAmine = 1,
     TertiaryAmine = 2,
diff --git a/src/mol-model-props/sequence/sifts-mapping.ts b/src/mol-model-props/sequence/sifts-mapping.ts
index 1c28307f8db05ec3ed8a2bf37d1dd618a5e7061c..0a6036abc18f57d555fe1a422b0a1d092735abfc 100644
--- a/src/mol-model-props/sequence/sifts-mapping.ts
+++ b/src/mol-model-props/sequence/sifts-mapping.ts
@@ -90,7 +90,7 @@ namespace SIFTSMapping {
         for (let i = 0; i < count; i++) {
             const row = atomSourceIndex.value(residueOffsets[i]);
 
-            if (db_name.valueKind(row) !== Column.ValueKind.Present) {
+            if (db_name.valueKind(row) !== Column.ValueKinds.Present) {
                 dbName[i] = '';
                 accession[i] = '';
                 num[i] = '';
diff --git a/src/mol-model/sequence/sequence.ts b/src/mol-model/sequence/sequence.ts
index e68daae6b833176faff4eaab6cd3b2679bb01c99..89c72ec26f34aeae27f4a59a41de9fbd112b1f77 100644
--- a/src/mol-model/sequence/sequence.ts
+++ b/src/mol-model/sequence/sequence.ts
@@ -14,7 +14,7 @@ import { assertUnreachable } from '../../mol-util/type-helpers';
 type Sequence = Sequence.Protein | Sequence.DNA | Sequence.RNA | Sequence.Generic
 
 namespace Sequence {
-    export const enum Kind {
+    export enum Kind {
         Protein = 'protein',
         RNA = 'RNA',
         DNA = 'DNA',
diff --git a/src/mol-model/structure/export/categories/atom_site_operator_mapping.ts b/src/mol-model/structure/export/categories/atom_site_operator_mapping.ts
index 11faadf0864bb0ce302a0869c8e514529b9fc4e7..a844972d7b4d1a3b7f476572fb4156e63cf3966a 100644
--- a/src/mol-model/structure/export/categories/atom_site_operator_mapping.ts
+++ b/src/mol-model/structure/export/categories/atom_site_operator_mapping.ts
@@ -41,8 +41,8 @@ export const AtomSiteOperatorMappingSchema = {
     }
 };
 
-const asmValueKind = (i: number, xs: Entry[]) => typeof xs[i].operator.assembly === 'undefined' ? Column.ValueKind.NotPresent : Column.ValueKind.Present;
-const symmetryValueKind = (i: number, xs: Entry[]) => xs[i].operator.spgrOp === -1 ? Column.ValueKind.NotPresent : Column.ValueKind.Present;
+const asmValueKind = (i: number, xs: Entry[]) => typeof xs[i].operator.assembly === 'undefined' ? Column.ValueKinds.NotPresent : Column.ValueKinds.Present;
+const symmetryValueKind = (i: number, xs: Entry[]) => xs[i].operator.spgrOp === -1 ? Column.ValueKinds.NotPresent : Column.ValueKinds.Present;
 
 const Fields = CifWriter.fields<number, Entry[], keyof (typeof AtomSiteOperatorMappingSchema)['molstar_atom_site_operator_mapping']>()
     .str('label_asym_id', (i, xs) => xs[i].label_asym_id)
diff --git a/src/mol-model/structure/export/categories/secondary-structure.ts b/src/mol-model/structure/export/categories/secondary-structure.ts
index da330f9e44aa95c279a7ea8df29c5ffd1f67bc76..ef592c16ea1c4b311b15b0f51df94ddc6fd430b0 100644
--- a/src/mol-model/structure/export/categories/secondary-structure.ts
+++ b/src/mol-model/structure/export/categories/secondary-structure.ts
@@ -49,7 +49,7 @@ const struct_conf_fields = (): CifField[] => [
     ...residueIdFields<number, SSElement<SecondaryStructure.Helix>[]>((i, e) => e[i].end, { prefix: 'end' }),
     CifField.str<number, SSElement<SecondaryStructure.Helix>[]>('pdbx_PDB_helix_class', (i, data) => data[i].element.helix_class),
     CifField.str<number, SSElement<SecondaryStructure.Helix>[]>('details', (i, data) => data[i].element.details || '', {
-        valueKind: (i, d) => !!d[i].element.details ? Column.ValueKind.Present : Column.ValueKind.Unknown
+        valueKind: (i, d) => !!d[i].element.details ? Column.ValueKinds.Present : Column.ValueKinds.Unknown
     }),
     CifField.int<number, SSElement<SecondaryStructure.Helix>[]>('pdbx_PDB_helix_length', (i, data) => data[i].length)
 ];
@@ -59,7 +59,7 @@ const struct_sheet_range_fields = (): CifField[] => [
     CifField.index('id'),
     ...residueIdFields<number, SSElement<SecondaryStructure.Sheet>[]>((i, e) => e[i].start, { prefix: 'beg' }),
     ...residueIdFields<number, SSElement<SecondaryStructure.Sheet>[]>((i, e) => e[i].end, { prefix: 'end' }),
-    CifField.str('symmetry', (i, data) => '', { valueKind: (i, d) => Column.ValueKind.Unknown })
+    CifField.str('symmetry', (i, data) => '', { valueKind: (i, d) => Column.ValueKinds.Unknown })
 ];
 
 interface SSElement<T extends SecondaryStructure.Element> {
diff --git a/src/mol-model/structure/model/model.ts b/src/mol-model/structure/model/model.ts
index 76e9c4077a8134dda1e41cac9ee2facd5f601eb5..206d98f91a44cf2304d2e12bb51f9d12085a236c 100644
--- a/src/mol-model/structure/model/model.ts
+++ b/src/mol-model/structure/model/model.ts
@@ -415,7 +415,7 @@ export namespace Model {
                 !db.exptl.method.isDefined ||
                 (isFromXray(model) && (
                     !db.pdbx_database_status.status_code_sf.isDefined ||
-                    db.pdbx_database_status.status_code_sf.valueKind(0) === Column.ValueKind.Unknown
+                    db.pdbx_database_status.status_code_sf.valueKind(0) === Column.ValueKinds.Unknown
                 )) ||
                 (isFromEm(model) && (
                     !db.pdbx_database_related.db_name.isDefined
diff --git a/src/mol-model/structure/model/types.ts b/src/mol-model/structure/model/types.ts
index 9795bdb628d3948ed0a74b01d8239125366eafdd..2643c4d8f4b6de985d85d35676daf64ee02fd828 100644
--- a/src/mol-model/structure/model/types.ts
+++ b/src/mol-model/structure/model/types.ts
@@ -47,7 +47,7 @@ export function getElementFromAtomicNumber(n: number) {
 }
 
 /** Entity types as defined in the mmCIF dictionary */
-export const enum EntityType {
+export enum EntityType {
     'unknown', 'polymer', 'non-polymer', 'macrolide', 'water', 'branched'
 }
 
diff --git a/src/mol-model/structure/query/utils/structure-distance.ts b/src/mol-model/structure/query/utils/structure-distance.ts
index 9e3b83378a8d38362f2260d9ab3fa18243c0a81c..fbe7e083e2ace8f71992eff5cade246298cc9b77 100644
--- a/src/mol-model/structure/query/utils/structure-distance.ts
+++ b/src/mol-model/structure/query/utils/structure-distance.ts
@@ -23,7 +23,7 @@ export function checkStructureMaxRadiusDistance(ctx: QueryContext, a: Structure,
 }
 
 namespace MinMaxDist {
-    export const enum Result {
+    const enum Result {
         BelowMin,
         WithinMax,
         Miss
@@ -44,7 +44,7 @@ namespace MinMaxDist {
         return withinRange ? Result.WithinMax : Result.Miss;
     }
 
-    export function toPoint(ctx: QueryContext, s: Structure, point: Vec3, radius: number, minDist: number, maxDist: number, elementRadius: QueryFn<number>) {
+    function toPoint(ctx: QueryContext, s: Structure, point: Vec3, radius: number, minDist: number, maxDist: number, elementRadius: QueryFn<number>) {
         const { units } = s;
         let withinRange = false;
         for (let i = 0, _i = units.length; i < _i; i++) {
@@ -70,7 +70,7 @@ namespace MinMaxDist {
                 const e = elements[i];
                 ctx.element.element = e;
                 const tp = toPoint(ctx, b, position(e, distPivot), elementRadius(ctx), minDist, maxDist, elementRadius);
-                if (tp === Result.BelowMin) return Result.BelowMin;
+                if (tp === Result.BelowMin) return false;
                 if (tp === Result.WithinMax) withinRange = true;
             }
         }
@@ -91,7 +91,7 @@ namespace MaxRadiusDist {
         return false;
     }
 
-    export function toPoint(ctx: QueryContext, s: Structure, point: Vec3, radius: number, maxDist: number, elementRadius: QueryFn<number>) {
+    function toPoint(ctx: QueryContext, s: Structure, point: Vec3, radius: number, maxDist: number, elementRadius: QueryFn<number>) {
         const { units } = s;
         for (let i = 0, _i = units.length; i < _i; i++) {
             if (inUnit(ctx, units[i], point, radius, maxDist, elementRadius)) return true;
diff --git a/src/mol-model/structure/structure/carbohydrates/constants.ts b/src/mol-model/structure/structure/carbohydrates/constants.ts
index aeb5fd82a1c2515becfcf439750f9fb7ccb35d8d..b85835115abcbd17841161ac938c24ee565fe142 100644
--- a/src/mol-model/structure/structure/carbohydrates/constants.ts
+++ b/src/mol-model/structure/structure/carbohydrates/constants.ts
@@ -10,7 +10,7 @@ import { SaccharideNames } from '../../model/types/saccharides';
 
 // follows community standard from https://www.ncbi.nlm.nih.gov/glycans/snfg.html
 
-export const enum SaccharideShape {
+export enum SaccharideShape {
     // standard shapes
     FilledSphere, FilledCube, CrossedCube, DividedDiamond, FilledCone, DevidedCone,
     FlatBox, FilledStar, FilledDiamond, FlatDiamond, FlatHexagon, Pentagon,
@@ -33,7 +33,7 @@ export const SaccharideColors = ColorMap({
     Secondary: 0xf1ece1
 });
 
-export const enum SaccharideType {
+export enum SaccharideType {
     Hexose, HexNAc, Hexosamine, Hexuronate, Deoxyhexose, DeoxyhexNAc, DiDeoxyhexose,
     Pentose, Deoxynonulosonate, DiDeoxynonulosonate, Unknown, Assigned
 }
diff --git a/src/mol-model/structure/structure/unit.ts b/src/mol-model/structure/structure/unit.ts
index 8d64234ad3e1d4a888e337233630a5562bfa00c9..b6c8fc172ce33c6e4c4fec473c3788d661dbb7f5 100644
--- a/src/mol-model/structure/structure/unit.ts
+++ b/src/mol-model/structure/structure/unit.ts
@@ -36,6 +36,9 @@ type Unit = Unit.Atomic | Unit.Spheres | Unit.Gaussians
 namespace Unit {
     export const enum Kind { Atomic, Spheres, Gaussians }
 
+    // To use with isolatedModules
+    export enum Kinds { Atomic = Kind.Atomic, Spheres = Kind.Spheres, Gaussians = Kind.Gaussians }
+
     export function isAtomic(u: Unit): u is Atomic { return u.kind === Kind.Atomic; }
     export function isCoarse(u: Unit): u is Spheres | Gaussians { return u.kind === Kind.Spheres || u.kind === Kind.Gaussians; }
     export function isSpheres(u: Unit): u is Spheres { return u.kind === Kind.Spheres; }
@@ -122,7 +125,7 @@ namespace Unit {
     }
 
     export type Traits = BitFlags<Trait>
-    export const enum Trait {
+    export enum Trait {
         None = 0x0,
         MultiChain = 0x1,
         Partitioned = 0x2
diff --git a/src/mol-theme/clipping.ts b/src/mol-theme/clipping.ts
index 04dd03558567e15ed53688202d2479922120736d..bbb22aea355f999ea5ea193fb3edb086ddfa8d60 100644
--- a/src/mol-theme/clipping.ts
+++ b/src/mol-theme/clipping.ts
@@ -26,7 +26,7 @@ namespace Clipping {
     export type Groups = BitFlags<Groups.Flag>
     export namespace Groups {
         export const is: (g: Groups, f: Flag) => boolean = BitFlags.has;
-        export const enum Flag {
+        export enum Flag {
             None = 0x0,
             One = 0x1,
             Two = 0x2,
diff --git a/src/mol-theme/color.ts b/src/mol-theme/color.ts
index 90de9ea13893a9b0053db51eece4675773305a2e..ff40261e1cd2b769fda64777bf64118f47f8ebbf 100644
--- a/src/mol-theme/color.ts
+++ b/src/mol-theme/color.ts
@@ -42,6 +42,7 @@ import { ModelIndexColorThemeProvider } from './color/model-index';
 import { StructureIndexColorThemeProvider } from './color/structure-index';
 import { VolumeSegmentColorThemeProvider } from './color/volume-segment';
 import { ExternalVolumeColorThemeProvider } from './color/external-volume';
+import { ColorThemeCategory } from './color/categories';
 
 export type LocationColor = (location: Location, isSecondary: boolean) => Color
 
@@ -87,14 +88,7 @@ type ColorTheme<P extends PD.Params, G extends ColorType = ColorTypeLocation> =
             G extends ColorTypeDirect ? ColorThemeDirect<P> : never
 
 namespace ColorTheme {
-    export const enum Category {
-        Atom = 'Atom Property',
-        Chain = 'Chain Property',
-        Residue = 'Residue Property',
-        Symmetry = 'Symmetry',
-        Validation = 'Validation',
-        Misc = 'Miscellaneous',
-    }
+    export const Category = ColorThemeCategory;
 
     export interface Palette {
         filter?: TextureFilter,
diff --git a/src/mol-theme/color/atom-id.ts b/src/mol-theme/color/atom-id.ts
index 6a44911a00f4ed57a9505acd601eacdbb1b9f1b2..b40569d6e63697d4a09c2bed4df40b4f3dfe002c 100644
--- a/src/mol-theme/color/atom-id.ts
+++ b/src/mol-theme/color/atom-id.ts
@@ -7,11 +7,12 @@
 import { StructureProperties, StructureElement, Bond, Structure } from '../../mol-model/structure';
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'many-distinct';
 const DefaultColor = Color(0xFAFAFA);
@@ -83,7 +84,7 @@ export function AtomIdColorTheme(ctx: ThemeDataContext, props: PD.Values<AtomIdC
 export const AtomIdColorThemeProvider: ColorTheme.Provider<AtomIdColorThemeParams, 'atom-id'> = {
     name: 'atom-id',
     label: 'Atom Id',
-    category: ColorTheme.Category.Atom,
+    category: ColorThemeCategory.Atom,
     factory: AtomIdColorTheme,
     getParams: getAtomIdColorThemeParams,
     defaultValues: PD.getDefaultValues(AtomIdColorThemeParams),
diff --git a/src/mol-theme/color/carbohydrate-symbol.ts b/src/mol-theme/color/carbohydrate-symbol.ts
index 928b785000c3117d722761f0460cff7c4de91798..ff615b21e28924858a393ae686b02a2e7768b876 100644
--- a/src/mol-theme/color/carbohydrate-symbol.ts
+++ b/src/mol-theme/color/carbohydrate-symbol.ts
@@ -7,11 +7,12 @@
 import { StructureElement, Bond, ElementIndex, Unit, Model } from '../../mol-model/structure';
 import { SaccharideColors, MonosaccharidesColorTable } from '../../mol-model/structure/structure/carbohydrates/constants';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { Color } from '../../mol-util/color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { TableLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Assigns colors according to the Symbol Nomenclature for Glycans (SNFG).';
@@ -63,7 +64,7 @@ export function CarbohydrateSymbolColorTheme(ctx: ThemeDataContext, props: PD.Va
 export const CarbohydrateSymbolColorThemeProvider: ColorTheme.Provider<CarbohydrateSymbolColorThemeParams, 'carbohydrate-symbol'> = {
     name: 'carbohydrate-symbol',
     label: 'Carbohydrate Symbol',
-    category: ColorTheme.Category.Residue,
+    category: ColorThemeCategory.Residue,
     factory: CarbohydrateSymbolColorTheme,
     getParams: getCarbohydrateSymbolColorThemeParams,
     defaultValues: PD.getDefaultValues(CarbohydrateSymbolColorThemeParams),
diff --git a/src/mol-theme/color/categories.ts b/src/mol-theme/color/categories.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9c23cbf226ae06993e7217ff133f2269a3f34518
--- /dev/null
+++ b/src/mol-theme/color/categories.ts
@@ -0,0 +1,14 @@
+/**
+ * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ *
+ * @author David Sehnal <david.sehnal@gmail.com>
+ */
+
+export const ColorThemeCategory = {
+    Atom: 'Atom Property',
+    Chain: 'Chain Property',
+    Residue: 'Residue Property',
+    Symmetry: 'Symmetry',
+    Validation: 'Validation',
+    Misc: 'Miscellaneous',
+};
\ No newline at end of file
diff --git a/src/mol-theme/color/chain-id.ts b/src/mol-theme/color/chain-id.ts
index 936a67c6b17b7cf441270e624a5627d10597569e..0797e7e74fdd736935206026d9d3e8b65ddccde1 100644
--- a/src/mol-theme/color/chain-id.ts
+++ b/src/mol-theme/color/chain-id.ts
@@ -7,11 +7,12 @@
 import { Unit, StructureProperties, StructureElement, Bond, Structure, Model } from '../../mol-model/structure';
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'many-distinct';
 const DefaultColor = Color(0xFAFAFA);
@@ -119,7 +120,7 @@ export function ChainIdColorTheme(ctx: ThemeDataContext, props: PD.Values<ChainI
 export const ChainIdColorThemeProvider: ColorTheme.Provider<ChainIdColorThemeParams, 'chain-id'> = {
     name: 'chain-id',
     label: 'Chain Id',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: ChainIdColorTheme,
     getParams: getChainIdColorThemeParams,
     defaultValues: PD.getDefaultValues(ChainIdColorThemeParams),
diff --git a/src/mol-theme/color/element-index.ts b/src/mol-theme/color/element-index.ts
index 21118f9cd20c2fb03cf05669f5289c5d634f67c1..cd6b06fdd380c5a42e4068cde6ff708446a2171b 100644
--- a/src/mol-theme/color/element-index.ts
+++ b/src/mol-theme/color/element-index.ts
@@ -8,11 +8,12 @@ import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { StructureElement, Bond } from '../../mol-model/structure';
 import { OrderedSet } from '../../mol-data/int';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives every element (atom or coarse sphere/gaussian) a unique color based on the position (index) of the element in the list of elements in the structure.';
@@ -75,7 +76,7 @@ export function ElementIndexColorTheme(ctx: ThemeDataContext, props: PD.Values<E
 export const ElementIndexColorThemeProvider: ColorTheme.Provider<ElementIndexColorThemeParams, 'element-index'> = {
     name: 'element-index',
     label: 'Element Index',
-    category: ColorTheme.Category.Atom,
+    category: ColorThemeCategory.Atom,
     factory: ElementIndexColorTheme,
     getParams: getElementIndexColorThemeParams,
     defaultValues: PD.getDefaultValues(ElementIndexColorThemeParams),
diff --git a/src/mol-theme/color/element-symbol.ts b/src/mol-theme/color/element-symbol.ts
index a466848df48e6d5b9b41e5ffc1d4a6e30954eed2..29d49ad9dbb8657cd133f166d9b537863b85c0e2 100644
--- a/src/mol-theme/color/element-symbol.ts
+++ b/src/mol-theme/color/element-symbol.ts
@@ -8,7 +8,7 @@ import { ElementSymbol } from '../../mol-model/structure/model/types';
 import { Color, ColorMap } from '../../mol-util/color';
 import { StructureElement, Unit, Bond } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { TableLegend } from '../../mol-util/legend';
@@ -21,6 +21,7 @@ import { assertUnreachable } from '../../mol-util/type-helpers';
 import { EntitySourceColorTheme, EntitySourceColorThemeParams } from './entity-source';
 import { ModelIndexColorTheme, ModelIndexColorThemeParams } from './model-index';
 import { StructureIndexColorTheme, StructureIndexColorThemeParams } from './structure-index';
+import { ColorThemeCategory } from './categories';
 
 // from Jmol http://jmol.sourceforge.net/jscolors/ (or 0xFFFFFF)
 export const ElementSymbolColors = ColorMap({
@@ -112,7 +113,7 @@ export function ElementSymbolColorTheme(ctx: ThemeDataContext, props: PD.Values<
 export const ElementSymbolColorThemeProvider: ColorTheme.Provider<ElementSymbolColorThemeParams, 'element-symbol'> = {
     name: 'element-symbol',
     label: 'Element Symbol',
-    category: ColorTheme.Category.Atom,
+    category: ColorThemeCategory.Atom,
     factory: ElementSymbolColorTheme,
     getParams: getElementSymbolColorThemeParams,
     defaultValues: PD.getDefaultValues(ElementSymbolColorThemeParams),
diff --git a/src/mol-theme/color/entity-id.ts b/src/mol-theme/color/entity-id.ts
index 2a89b5523bcd4ef9344eed4665976b365b7cfb79..3c8dcde14224efd3ac14e863b3d678147fb1d61c 100644
--- a/src/mol-theme/color/entity-id.ts
+++ b/src/mol-theme/color/entity-id.ts
@@ -7,11 +7,12 @@
 import { StructureProperties, StructureElement, Bond, Structure, Unit } from '../../mol-model/structure';
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'many-distinct';
 const DefaultColor = Color(0xFAFAFA);
@@ -113,7 +114,7 @@ export function EntityIdColorTheme(ctx: ThemeDataContext, props: PD.Values<Entit
 export const EntityIdColorThemeProvider: ColorTheme.Provider<EntityIdColorThemeParams, 'entity-id'> = {
     name: 'entity-id',
     label: 'Entity Id',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: EntityIdColorTheme,
     getParams: getEntityIdColorThemeParams,
     defaultValues: PD.getDefaultValues(EntityIdColorThemeParams),
diff --git a/src/mol-theme/color/entity-source.ts b/src/mol-theme/color/entity-source.ts
index cb136024af89f7bb5811b7a6063b99ba24b25607..d6638e67911c78a026c96fc38d6067d70a5d0efa 100644
--- a/src/mol-theme/color/entity-source.ts
+++ b/src/mol-theme/color/entity-source.ts
@@ -7,7 +7,7 @@
 import { StructureProperties, StructureElement, Bond, Model } from '../../mol-model/structure';
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { Table, Column } from '../../mol-data/db';
@@ -17,6 +17,7 @@ import { TableLegend, ScaleLegend } from '../../mol-util/legend';
 import { isInteger } from '../../mol-util/number';
 import { ColorLists, getColorListFromName } from '../../mol-util/color/lists';
 import { MmcifFormat } from '../../mol-model-formats/structure/mmcif';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'dark-2';
 const DefaultColor = Color(0xFAFAFA);
@@ -78,8 +79,8 @@ function addSrc(seqToSrcByModelEntity: Map<string, Int16Array>, srcKeySerialMap:
         const sK = srcKey(modelIndex, entityId, scientific_name.value(j), pdbx_src_id.value(j), plasmid, gene);
 
         // may not be given (= 0) indicating src is for the whole seq
-        const beg = pdbx_beg_seq_num.valueKind(j) === Column.ValueKind.Present ? pdbx_beg_seq_num.value(j) : 1;
-        const end = pdbx_end_seq_num.valueKind(j) === Column.ValueKind.Present ? pdbx_end_seq_num.value(j) : seqToSrc.length;
+        const beg = pdbx_beg_seq_num.valueKind(j) === Column.ValueKinds.Present ? pdbx_beg_seq_num.value(j) : 1;
+        const end = pdbx_end_seq_num.valueKind(j) === Column.ValueKinds.Present ? pdbx_end_seq_num.value(j) : seqToSrc.length;
 
         let srcIndex: number; // serial no starting from 1
         if (srcKeySerialMap.has(sK)) {
@@ -178,7 +179,7 @@ export function EntitySourceColorTheme(ctx: ThemeDataContext, props: PD.Values<E
 export const EntitySourceColorThemeProvider: ColorTheme.Provider<EntitySourceColorThemeParams, 'entity-source'> = {
     name: 'entity-source',
     label: 'Entity Source',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: EntitySourceColorTheme,
     getParams: getEntitySourceColorThemeParams,
     defaultValues: PD.getDefaultValues(EntitySourceColorThemeParams),
diff --git a/src/mol-theme/color/external-volume.ts b/src/mol-theme/color/external-volume.ts
index 43fce54d962f8ff4e86de8049bdf650f794ce0cd..5b9ac1624daabef183a6fac00765d26f77e91ee8 100644
--- a/src/mol-theme/color/external-volume.ts
+++ b/src/mol-theme/color/external-volume.ts
@@ -6,7 +6,7 @@
 
 import { Color, ColorScale } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { Grid, Volume } from '../../mol-model/volume';
@@ -14,6 +14,7 @@ import { type PluginContext } from '../../mol-plugin/context';
 import { isPositionLocation } from '../../mol-geo/util/location-iterator';
 import { Mat4, Vec3 } from '../../mol-math/linear-algebra';
 import { lerp } from '../../mol-math/interpolate';
+import { ColorThemeCategory } from './categories';
 
 const Description = `Assigns a color based volume value at a given vertex.`;
 
@@ -151,7 +152,7 @@ export function ExternalVolumeColorTheme(ctx: ThemeDataContext, props: PD.Values
 export const ExternalVolumeColorThemeProvider: ColorTheme.Provider<ExternalVolumeColorThemeParams, 'external-volume'> = {
     name: 'external-volume',
     label: 'External Volume',
-    category: ColorTheme.Category.Misc,
+    category: ColorThemeCategory.Misc,
     factory: ExternalVolumeColorTheme,
     getParams: () => ExternalVolumeColorThemeParams,
     defaultValues: PD.getDefaultValues(ExternalVolumeColorThemeParams),
diff --git a/src/mol-theme/color/hydrophobicity.ts b/src/mol-theme/color/hydrophobicity.ts
index 40484ca7553570e870b256d8f74acf47c68af680..3feb165efd8eb3ff51fc0e7fe9f67a722c956cfd 100644
--- a/src/mol-theme/color/hydrophobicity.ts
+++ b/src/mol-theme/color/hydrophobicity.ts
@@ -7,10 +7,11 @@
 import { Color, ColorScale } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { ResidueHydrophobicity } from '../../mol-model/structure/model/types';
+import { ColorThemeCategory } from './categories';
 
 const Description = 'Assigns a color to every amino acid according to the "Experimentally determined hydrophobicity scale for proteins at membrane interfaces" by Wimely and White (doi:10.1038/nsb1096-842).';
 
@@ -95,7 +96,7 @@ export function HydrophobicityColorTheme(ctx: ThemeDataContext, props: PD.Values
 export const HydrophobicityColorThemeProvider: ColorTheme.Provider<HydrophobicityColorThemeParams, 'hydrophobicity'> = {
     name: 'hydrophobicity',
     label: 'Hydrophobicity',
-    category: ColorTheme.Category.Residue,
+    category: ColorThemeCategory.Residue,
     factory: HydrophobicityColorTheme,
     getParams: getHydrophobicityColorThemeParams,
     defaultValues: PD.getDefaultValues(HydrophobicityColorThemeParams),
diff --git a/src/mol-theme/color/illustrative.ts b/src/mol-theme/color/illustrative.ts
index 18510ef68fdb85d0aa57c6d49ae08eefeae2009c..b364e4d897bb5fc3eed1912da082f70be2f3c36a 100644
--- a/src/mol-theme/color/illustrative.ts
+++ b/src/mol-theme/color/illustrative.ts
@@ -8,7 +8,7 @@ import { ElementSymbol } from '../../mol-model/structure/model/types';
 import { Color } from '../../mol-util/color';
 import { StructureElement, Unit, Bond } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { ChainIdColorTheme, ChainIdColorThemeParams } from './chain-id';
@@ -19,6 +19,7 @@ import { MoleculeTypeColorTheme, MoleculeTypeColorThemeParams } from './molecule
 import { EntitySourceColorTheme, EntitySourceColorThemeParams } from './entity-source';
 import { ModelIndexColorTheme, ModelIndexColorThemeParams } from './model-index';
 import { StructureIndexColorTheme, StructureIndexColorThemeParams } from './structure-index';
+import { ColorThemeCategory } from './categories';
 
 const DefaultIllustrativeColor = Color(0xEEEEEE);
 const Description = `Assigns an illustrative color that gives every chain a color based on the chosen style but with lighter carbons (inspired by David Goodsell's Molecule of the Month style).`;
@@ -83,7 +84,7 @@ export function IllustrativeColorTheme(ctx: ThemeDataContext, props: PD.Values<I
 export const IllustrativeColorThemeProvider: ColorTheme.Provider<IllustrativeColorThemeParams, 'illustrative'> = {
     name: 'illustrative',
     label: 'Illustrative',
-    category: ColorTheme.Category.Misc,
+    category: ColorThemeCategory.Misc,
     factory: IllustrativeColorTheme,
     getParams: getIllustrativeColorThemeParams,
     defaultValues: PD.getDefaultValues(IllustrativeColorThemeParams),
diff --git a/src/mol-theme/color/model-index.ts b/src/mol-theme/color/model-index.ts
index cbdfd683f10abebf07ceee1ba180b57331440ce0..457aee9b5150ea236bb5265dabfb4f5af4affb73 100644
--- a/src/mol-theme/color/model-index.ts
+++ b/src/mol-theme/color/model-index.ts
@@ -8,11 +8,12 @@
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { StructureElement, Bond, Model } from '../../mol-model/structure';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives every model a unique color based on its index.';
@@ -61,7 +62,7 @@ export function ModelIndexColorTheme(ctx: ThemeDataContext, props: PD.Values<Mod
 export const ModelIndexColorThemeProvider: ColorTheme.Provider<ModelIndexColorThemeParams, 'model-index'> = {
     name: 'model-index',
     label: 'Model Index',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: ModelIndexColorTheme,
     getParams: getModelIndexColorThemeParams,
     defaultValues: PD.getDefaultValues(ModelIndexColorThemeParams),
diff --git a/src/mol-theme/color/molecule-type.ts b/src/mol-theme/color/molecule-type.ts
index 723e5734c16bcb7234bd8f8c9931f41a92a880f1..75953becf833d0e89d42dc6e0e918fc20da2d842 100644
--- a/src/mol-theme/color/molecule-type.ts
+++ b/src/mol-theme/color/molecule-type.ts
@@ -7,7 +7,7 @@
 import { Color, ColorMap } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { MoleculeType } from '../../mol-model/structure/model/types';
 import { getElementMoleculeType } from '../../mol-model/structure/util';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
@@ -15,6 +15,7 @@ import { ThemeDataContext } from '../theme';
 import { TableLegend } from '../../mol-util/legend';
 import { getAdjustedColorMap } from '../../mol-util/color/color';
 import { getColorMapParams } from '../../mol-util/color/params';
+import { ColorThemeCategory } from './categories';
 
 export const MoleculeTypeColors = ColorMap({
     water: 0x386cb0,
@@ -84,7 +85,7 @@ export function MoleculeTypeColorTheme(ctx: ThemeDataContext, props: PD.Values<M
 export const MoleculeTypeColorThemeProvider: ColorTheme.Provider<MoleculeTypeColorThemeParams, 'molecule-type'> = {
     name: 'molecule-type',
     label: 'Molecule Type',
-    category: ColorTheme.Category.Residue,
+    category: ColorThemeCategory.Residue,
     factory: MoleculeTypeColorTheme,
     getParams: getMoleculeTypeColorThemeParams,
     defaultValues: PD.getDefaultValues(MoleculeTypeColorThemeParams),
diff --git a/src/mol-theme/color/occupancy.ts b/src/mol-theme/color/occupancy.ts
index a00f434a7401e7912b258eff5f731acb45bbfdf6..26ed6f4ad2ea468c93c04eaeffae923a331dd3ae 100644
--- a/src/mol-theme/color/occupancy.ts
+++ b/src/mol-theme/color/occupancy.ts
@@ -7,9 +7,10 @@
 import { Color, ColorScale } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
+import { ColorThemeCategory } from './categories';
 
 const DefaultOccupancyColor = Color(0xCCCCCC);
 const Description = `Assigns a color based on the occupancy of an atom.`;
@@ -61,7 +62,7 @@ export function OccupancyColorTheme(ctx: ThemeDataContext, props: PD.Values<Occu
 export const OccupancyColorThemeProvider: ColorTheme.Provider<OccupancyColorThemeParams, 'occupancy'> = {
     name: 'occupancy',
     label: 'Occupancy',
-    category: ColorTheme.Category.Atom,
+    category: ColorThemeCategory.Atom,
     factory: OccupancyColorTheme,
     getParams: getOccupancyColorThemeParams,
     defaultValues: PD.getDefaultValues(OccupancyColorThemeParams),
diff --git a/src/mol-theme/color/operator-hkl.ts b/src/mol-theme/color/operator-hkl.ts
index 3062dfc2ffc46001830cf5a9337d210953810631..0c8e3d13a068d5bcbe98d62a915f5cbf59676aff 100644
--- a/src/mol-theme/color/operator-hkl.ts
+++ b/src/mol-theme/color/operator-hkl.ts
@@ -7,7 +7,7 @@
 import { Color } from '../../mol-util/color';
 import { StructureElement, Bond, Structure } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
@@ -15,6 +15,7 @@ import { ScaleLegend, TableLegend } from '../../mol-util/legend';
 import { Vec3 } from '../../mol-math/linear-algebra';
 import { integerDigitCount } from '../../mol-util/number';
 import { ColorLists, getColorListFromName } from '../../mol-util/color/lists';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'dark-2';
 const DefaultColor = Color(0xCCCCCC);
@@ -122,7 +123,7 @@ export function OperatorHklColorTheme(ctx: ThemeDataContext, props: PD.Values<Op
 export const OperatorHklColorThemeProvider: ColorTheme.Provider<OperatorHklColorThemeParams, 'operator-hkl'> = {
     name: 'operator-hkl',
     label: 'Operator HKL',
-    category: ColorTheme.Category.Symmetry,
+    category: ColorThemeCategory.Symmetry,
     factory: OperatorHklColorTheme,
     getParams: getOperatorHklColorThemeParams,
     defaultValues: PD.getDefaultValues(OperatorHklColorThemeParams),
diff --git a/src/mol-theme/color/operator-name.ts b/src/mol-theme/color/operator-name.ts
index f77e5b0c2a79571a72649f38ed017b3745f9c513..cc793c2fec7e2a64c103ebda7c55519efdf9f22f 100644
--- a/src/mol-theme/color/operator-name.ts
+++ b/src/mol-theme/color/operator-name.ts
@@ -7,11 +7,12 @@
 import { Color } from '../../mol-util/color';
 import { StructureElement, Bond, Structure } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { ScaleLegend, TableLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'many-distinct';
 const DefaultColor = Color(0xCCCCCC);
@@ -76,7 +77,7 @@ export function OperatorNameColorTheme(ctx: ThemeDataContext, props: PD.Values<O
 export const OperatorNameColorThemeProvider: ColorTheme.Provider<OperatorNameColorThemeParams, 'operator-name'> = {
     name: 'operator-name',
     label: 'Operator Name',
-    category: ColorTheme.Category.Symmetry,
+    category: ColorThemeCategory.Symmetry,
     factory: OperatorNameColorTheme,
     getParams: getOperatorNameColorThemeParams,
     defaultValues: PD.getDefaultValues(OperatorNameColorThemeParams),
diff --git a/src/mol-theme/color/partial-charge.ts b/src/mol-theme/color/partial-charge.ts
index 6baadd9eecb70cde7715241caedc229eff89865c..eff097b1320365c985fa94f1b5c103b852b55d8b 100644
--- a/src/mol-theme/color/partial-charge.ts
+++ b/src/mol-theme/color/partial-charge.ts
@@ -7,10 +7,11 @@
 import { Color, ColorScale } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { AtomPartialCharge } from '../../mol-model-formats/structure/property/partial-charge';
+import { ColorThemeCategory } from './categories';
 
 const DefaultPartialChargeColor = Color(0xffff99);
 const Description = `Assigns a color based on the partial charge of an atom.`;
@@ -59,7 +60,7 @@ export function PartialChargeColorTheme(ctx: ThemeDataContext, props: PD.Values<
 export const PartialChargeColorThemeProvider: ColorTheme.Provider<PartialChargeColorThemeParams, 'partial-charge'> = {
     name: 'partial-charge',
     label: 'Partial Charge',
-    category: ColorTheme.Category.Atom,
+    category: ColorThemeCategory.Atom,
     factory: PartialChargeColorTheme,
     getParams: getPartialChargeColorThemeParams,
     defaultValues: PD.getDefaultValues(PartialChargeColorThemeParams),
diff --git a/src/mol-theme/color/polymer-id.ts b/src/mol-theme/color/polymer-id.ts
index 1bbe42bafc81c7779a127b4770d7de24eabe55e1..3392bef3473db043d3e5b1b14d10d91dee451864 100644
--- a/src/mol-theme/color/polymer-id.ts
+++ b/src/mol-theme/color/polymer-id.ts
@@ -8,13 +8,14 @@ import { Unit, StructureProperties, StructureElement, Bond, Structure } from '..
 
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPalette, getPaletteParams } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
 import { Segmentation } from '../../mol-data/int';
 import { ColorLists, getColorListFromName } from '../../mol-util/color/lists';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'dark-2';
 const DefaultColor = Color(0xFAFAFA);
@@ -129,7 +130,7 @@ export function PolymerIdColorTheme(ctx: ThemeDataContext, props: PD.Values<Poly
 export const PolymerIdColorThemeProvider: ColorTheme.Provider<PolymerIdColorThemeParams, 'polymer-id'> = {
     name: 'polymer-id',
     label: 'Polymer Chain Id',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: PolymerIdColorTheme,
     getParams: getPolymerIdColorThemeParams,
     defaultValues: PD.getDefaultValues(PolymerIdColorThemeParams),
diff --git a/src/mol-theme/color/polymer-index.ts b/src/mol-theme/color/polymer-index.ts
index aaf23e15384a177033a772c8d06946a4715a97eb..8655aaf39cfd0112538c6124c811a7439db50c21 100644
--- a/src/mol-theme/color/polymer-index.ts
+++ b/src/mol-theme/color/polymer-index.ts
@@ -7,12 +7,13 @@
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { StructureElement, Bond, Structure } from '../../mol-model/structure';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { ColorLists, getColorListFromName } from '../../mol-util/color/lists';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'dark-2';
 const DefaultColor = Color(0xCCCCCC);
@@ -89,7 +90,7 @@ export function PolymerIndexColorTheme(ctx: ThemeDataContext, props: PD.Values<P
 export const PolymerIndexColorThemeProvider: ColorTheme.Provider<PolymerIndexColorThemeParams, 'polymer-index'> = {
     name: 'polymer-index',
     label: 'Polymer Chain Instance',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: PolymerIndexColorTheme,
     getParams: getPolymerIndexColorThemeParams,
     defaultValues: PD.getDefaultValues(PolymerIndexColorThemeParams),
diff --git a/src/mol-theme/color/residue-name.ts b/src/mol-theme/color/residue-name.ts
index 57e981248a9810c395c731df3752dae7c292d450..d43b880732de1f673766d7f20644ae75d7a19b32 100644
--- a/src/mol-theme/color/residue-name.ts
+++ b/src/mol-theme/color/residue-name.ts
@@ -7,12 +7,13 @@
 import { Color, ColorMap } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { TableLegend } from '../../mol-util/legend';
 import { getAdjustedColorMap } from '../../mol-util/color/color';
 import { getColorMapParams } from '../../mol-util/color/params';
+import { ColorThemeCategory } from './categories';
 
 // protein colors from Jmol http://jmol.sourceforge.net/jscolors/
 export const ResidueNameColors = ColorMap({
@@ -137,7 +138,7 @@ export function ResidueNameColorTheme(ctx: ThemeDataContext, props: PD.Values<Re
 export const ResidueNameColorThemeProvider: ColorTheme.Provider<ResidueNameColorThemeParams, 'residue-name'> = {
     name: 'residue-name',
     label: 'Residue Name',
-    category: ColorTheme.Category.Residue,
+    category: ColorThemeCategory.Residue,
     factory: ResidueNameColorTheme,
     getParams: getResidueNameColorThemeParams,
     defaultValues: PD.getDefaultValues(ResidueNameColorThemeParams),
diff --git a/src/mol-theme/color/secondary-structure.ts b/src/mol-theme/color/secondary-structure.ts
index 5a3734fa4279af45fb47994678fa240fc4fdd07f..0a61cef088fa0166e260e0488a488d8e9b91636e 100644
--- a/src/mol-theme/color/secondary-structure.ts
+++ b/src/mol-theme/color/secondary-structure.ts
@@ -7,7 +7,7 @@
 import { Color, ColorMap } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { SecondaryStructureType, MoleculeType } from '../../mol-model/structure/model/types';
 import { getElementMoleculeType } from '../../mol-model/structure/util';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
@@ -18,6 +18,7 @@ import { getAdjustedColorMap } from '../../mol-util/color/color';
 import { getColorMapParams } from '../../mol-util/color/params';
 import { CustomProperty } from '../../mol-model-props/common/custom-property';
 import { hash2 } from '../../mol-data/util';
+import { ColorThemeCategory } from './categories';
 
 // from Jmol http://jmol.sourceforge.net/jscolors/ (shapely)
 const SecondaryStructureColors = ColorMap({
@@ -121,7 +122,7 @@ export function SecondaryStructureColorTheme(ctx: ThemeDataContext, props: PD.Va
 export const SecondaryStructureColorThemeProvider: ColorTheme.Provider<SecondaryStructureColorThemeParams, 'secondary-structure'> = {
     name: 'secondary-structure',
     label: 'Secondary Structure',
-    category: ColorTheme.Category.Residue,
+    category: ColorThemeCategory.Residue,
     factory: SecondaryStructureColorTheme,
     getParams: getSecondaryStructureColorThemeParams,
     defaultValues: PD.getDefaultValues(SecondaryStructureColorThemeParams),
diff --git a/src/mol-theme/color/sequence-id.ts b/src/mol-theme/color/sequence-id.ts
index 01c3b347f4e644ae8837570e1bd73e6d4fc9d100..72389efe17268c455b4d94da74c22fffc41a176d 100644
--- a/src/mol-theme/color/sequence-id.ts
+++ b/src/mol-theme/color/sequence-id.ts
@@ -8,9 +8,10 @@ import { Unit, StructureElement, Bond, ElementIndex } from '../../mol-model/stru
 
 import { ColorScale, Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives every polymer residue a color based on its `seq_id` value.';
@@ -113,7 +114,7 @@ export function SequenceIdColorTheme(ctx: ThemeDataContext, props: PD.Values<Seq
 export const SequenceIdColorThemeProvider: ColorTheme.Provider<SequenceIdColorThemeParams, 'sequence-id'> = {
     name: 'sequence-id',
     label: 'Sequence Id',
-    category: ColorTheme.Category.Residue,
+    category: ColorThemeCategory.Residue,
     factory: SequenceIdColorTheme,
     getParams: getSequenceIdColorThemeParams,
     defaultValues: PD.getDefaultValues(SequenceIdColorThemeParams),
diff --git a/src/mol-theme/color/shape-group.ts b/src/mol-theme/color/shape-group.ts
index 68d1b840a19664d2156b590da3a82a47cfd1a869..ba4b171441488669de867c97637ff1d336ef5aee 100644
--- a/src/mol-theme/color/shape-group.ts
+++ b/src/mol-theme/color/shape-group.ts
@@ -4,12 +4,13 @@
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
 
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { ShapeGroup } from '../../mol-model/shape';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Assigns colors as defined by the shape object.';
@@ -38,7 +39,7 @@ export function ShapeGroupColorTheme(ctx: ThemeDataContext, props: PD.Values<Sha
 export const ShapeGroupColorThemeProvider: ColorTheme.Provider<ShapeGroupColorThemeParams, 'shape-group'> = {
     name: 'shape-group',
     label: 'Shape Group',
-    category: ColorTheme.Category.Misc,
+    category: ColorThemeCategory.Misc,
     factory: ShapeGroupColorTheme,
     getParams: getShapeGroupColorThemeParams,
     defaultValues: PD.getDefaultValues(ShapeGroupColorThemeParams),
diff --git a/src/mol-theme/color/structure-index.ts b/src/mol-theme/color/structure-index.ts
index 28dda92802ae4db29fd67dc7f807fc3ec1988583..6f5cea46258f282e5fa15a40396a73a6fcdfed65 100644
--- a/src/mol-theme/color/structure-index.ts
+++ b/src/mol-theme/color/structure-index.ts
@@ -7,11 +7,12 @@
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { StructureElement, Bond, Structure } from '../../mol-model/structure';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives every structure a unique color based on its index.';
@@ -59,7 +60,7 @@ export function StructureIndexColorTheme(ctx: ThemeDataContext, props: PD.Values
 export const StructureIndexColorThemeProvider: ColorTheme.Provider<StructureIndexColorThemeParams, 'structure-index'> = {
     name: 'structure-index',
     label: 'Structure Index',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: StructureIndexColorTheme,
     getParams: getStructureIndexColorThemeParams,
     defaultValues: PD.getDefaultValues(StructureIndexColorThemeParams),
diff --git a/src/mol-theme/color/trajectory-index.ts b/src/mol-theme/color/trajectory-index.ts
index 87b1b995518805448bdffc7baab9d46447c3ef26..2c027767e69f7daa620e3b3717bbea742aca8ae4 100644
--- a/src/mol-theme/color/trajectory-index.ts
+++ b/src/mol-theme/color/trajectory-index.ts
@@ -7,11 +7,12 @@
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { StructureElement, Bond, Model } from '../../mol-model/structure';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives every model (frame) a unique color based on the index in its trajectory.';
@@ -67,7 +68,7 @@ export function TrajectoryIndexColorTheme(ctx: ThemeDataContext, props: PD.Value
 export const TrajectoryIndexColorThemeProvider: ColorTheme.Provider<TrajectoryIndexColorThemeParams, 'trajectory-index'> = {
     name: 'trajectory-index',
     label: 'Trajectory Index',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: TrajectoryIndexColorTheme,
     getParams: getTrajectoryIndexColorThemeParams,
     defaultValues: PD.getDefaultValues(TrajectoryIndexColorThemeParams),
diff --git a/src/mol-theme/color/uncertainty.ts b/src/mol-theme/color/uncertainty.ts
index 891bc7abbf9b37ba6bd3bc055d5b41a4a6026058..a375058031c8fa396ea5e8c2281e653e887dd44a 100644
--- a/src/mol-theme/color/uncertainty.ts
+++ b/src/mol-theme/color/uncertainty.ts
@@ -7,9 +7,10 @@
 import { Color, ColorScale } from '../../mol-util/color';
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
+import { ColorThemeCategory } from './categories';
 
 const DefaultUncertaintyColor = Color(0xffff99);
 const Description = `Assigns a color based on the uncertainty or disorder of an element's position, e.g. B-factor or RMSF, depending on the data availability and experimental technique.`;
@@ -65,7 +66,7 @@ export function UncertaintyColorTheme(ctx: ThemeDataContext, props: PD.Values<Un
 export const UncertaintyColorThemeProvider: ColorTheme.Provider<UncertaintyColorThemeParams, 'uncertainty'> = {
     name: 'uncertainty',
     label: 'Uncertainty/Disorder',
-    category: ColorTheme.Category.Atom,
+    category: ColorThemeCategory.Atom,
     factory: UncertaintyColorTheme,
     getParams: getUncertaintyColorThemeParams,
     defaultValues: PD.getDefaultValues(UncertaintyColorThemeParams),
diff --git a/src/mol-theme/color/uniform.ts b/src/mol-theme/color/uniform.ts
index a3cbb003e190aa7df0cb40b1e7db421baead14cc..dd5d296dca4558fb1c592221d92b6f58f5ad0d66 100644
--- a/src/mol-theme/color/uniform.ts
+++ b/src/mol-theme/color/uniform.ts
@@ -4,12 +4,13 @@
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
 
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { Color } from '../../mol-util/color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { TableLegend } from '../../mol-util/legend';
 import { defaults } from '../../mol-util';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives everything the same, uniform color.';
@@ -38,7 +39,7 @@ export function UniformColorTheme(ctx: ThemeDataContext, props: PD.Values<Unifor
 export const UniformColorThemeProvider: ColorTheme.Provider<UniformColorThemeParams, 'uniform'> = {
     name: 'uniform',
     label: 'Uniform',
-    category: ColorTheme.Category.Misc,
+    category: ColorThemeCategory.Misc,
     factory: UniformColorTheme,
     getParams: getUniformColorThemeParams,
     defaultValues: PD.getDefaultValues(UniformColorThemeParams),
diff --git a/src/mol-theme/color/unit-index.ts b/src/mol-theme/color/unit-index.ts
index 54c5ef83588198bc97aaa0d4e8c45a6d1498ca1d..5368b0c338ff74bb1d51350b7011ecce3b4a84cd 100644
--- a/src/mol-theme/color/unit-index.ts
+++ b/src/mol-theme/color/unit-index.ts
@@ -7,12 +7,13 @@
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
 import { StructureElement, Bond } from '../../mol-model/structure';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
 import { ColorLists, getColorListFromName } from '../../mol-util/color/lists';
+import { ColorThemeCategory } from './categories';
 
 const DefaultList = 'dark-2';
 const DefaultColor = Color(0xCCCCCC);
@@ -74,7 +75,7 @@ export function UnitIndexColorTheme(ctx: ThemeDataContext, props: PD.Values<Unit
 export const UnitIndexColorThemeProvider: ColorTheme.Provider<UnitIndexColorThemeParams, 'unit-index'> = {
     name: 'unit-index',
     label: 'Chain Instance',
-    category: ColorTheme.Category.Chain,
+    category: ColorThemeCategory.Chain,
     factory: UnitIndexColorTheme,
     getParams: getUnitIndexColorThemeParams,
     defaultValues: PD.getDefaultValues(UnitIndexColorThemeParams),
diff --git a/src/mol-theme/color/volume-segment.ts b/src/mol-theme/color/volume-segment.ts
index 12bfd83bcd21055004a0620428afedbfc783be59..e81353cc7b37be76cc4afa5b4198d33ab5578cdb 100644
--- a/src/mol-theme/color/volume-segment.ts
+++ b/src/mol-theme/color/volume-segment.ts
@@ -6,12 +6,13 @@
 
 import { Color } from '../../mol-util/color';
 import { Location } from '../../mol-model/location';
-import { ColorTheme, LocationColor } from '../color';
+import type { ColorTheme, LocationColor } from '../color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 import { getPaletteParams, getPalette } from '../../mol-util/color/palette';
 import { TableLegend, ScaleLegend } from '../../mol-util/legend';
 import { Volume } from '../../mol-model/volume/volume';
+import { ColorThemeCategory } from './categories';
 
 const DefaultColor = Color(0xCCCCCC);
 const Description = 'Gives every volume segment a unique color.';
@@ -60,7 +61,7 @@ export function VolumeSegmentColorTheme(ctx: ThemeDataContext, props: PD.Values<
 export const VolumeSegmentColorThemeProvider: ColorTheme.Provider<VolumeSegmentColorThemeParams, 'volume-segment'> = {
     name: 'volume-segment',
     label: 'Volume Segment',
-    category: ColorTheme.Category.Misc,
+    category: ColorThemeCategory.Misc,
     factory: VolumeSegmentColorTheme,
     getParams: getVolumeSegmentColorThemeParams,
     defaultValues: PD.getDefaultValues(VolumeSegmentColorThemeParams),
diff --git a/src/mol-theme/color/volume-value.ts b/src/mol-theme/color/volume-value.ts
index 71c6c9322d0441b5872c8d45df3951b2bc4d4eac..aac13ae7b8bc77374f3f4f8bdb38e98b8c4a7fe4 100644
--- a/src/mol-theme/color/volume-value.ts
+++ b/src/mol-theme/color/volume-value.ts
@@ -4,13 +4,14 @@
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
 
-import { ColorTheme } from '../color';
+import type { ColorTheme } from '../color';
 import { Color, ColorScale } from '../../mol-util/color';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../theme';
 import { ColorNames } from '../../mol-util/color/names';
 import { ColorTypeDirect } from '../../mol-geo/geometry/color-data';
 import { Volume } from '../../mol-model/volume/volume';
+import { ColorThemeCategory } from './categories';
 
 const Description = 'Assign color based on the given value of a volume cell.';
 
@@ -54,7 +55,7 @@ export function VolumeValueColorTheme(ctx: ThemeDataContext, props: PD.Values<Vo
 export const VolumeValueColorThemeProvider: ColorTheme.Provider<VolumeValueColorThemeParams, 'volume-value'> = {
     name: 'volume-value',
     label: 'Volume Value',
-    category: ColorTheme.Category.Misc,
+    category: ColorThemeCategory.Misc,
     factory: VolumeValueColorTheme,
     getParams: getVolumeValueColorThemeParams,
     defaultValues: PD.getDefaultValues(VolumeValueColorThemeParams),
diff --git a/src/mol-theme/label.ts b/src/mol-theme/label.ts
index 28f50a6e0ceaddaeff29c618cd8a78fc292c44e5..f04c8f65830a5eb544d21d8857e13a574276b5f6 100644
--- a/src/mol-theme/label.ts
+++ b/src/mol-theme/label.ts
@@ -254,7 +254,7 @@ function _atomicElementLabel(location: StructureElement.Location<Unit.Atomic>, g
 
     const label_asym_id = Props.chain.label_asym_id(location);
     const auth_asym_id = Props.chain.auth_asym_id(location);
-    const has_label_seq_id = location.unit.model.atomicHierarchy.residues.label_seq_id.valueKind(rI) === Column.ValueKind.Present;
+    const has_label_seq_id = location.unit.model.atomicHierarchy.residues.label_seq_id.valueKind(rI) === Column.ValueKinds.Present;
     const label_seq_id = Props.residue.label_seq_id(location);
     const auth_seq_id = Props.residue.auth_seq_id(location);
     const ins_code = Props.residue.pdbx_PDB_ins_code(location);
diff --git a/src/mol-theme/size/physical.ts b/src/mol-theme/size/physical.ts
index fdd6ff0fdf14ca53b883e12a38345cf19cbdee52..c46ca41d66307f9c1b7b201a6061971d2de3cfd2 100644
--- a/src/mol-theme/size/physical.ts
+++ b/src/mol-theme/size/physical.ts
@@ -6,7 +6,7 @@
 
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { SizeTheme } from '../size';
+import type { SizeTheme } from '../size';
 import { VdwRadius } from '../../mol-model/structure/model/properties/atomic';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
diff --git a/src/mol-theme/size/shape-group.ts b/src/mol-theme/size/shape-group.ts
index 226d1c72a6afc361153a612c584b81289d88a1d4..f885cdea4ad828cad14634e79619f164cfd03226 100644
--- a/src/mol-theme/size/shape-group.ts
+++ b/src/mol-theme/size/shape-group.ts
@@ -8,7 +8,7 @@ import { Location } from '../../mol-model/location';
 import { ShapeGroup } from '../../mol-model/shape';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
-import { SizeTheme } from '../../mol-theme/size';
+import type { SizeTheme } from '../../mol-theme/size';
 
 const DefaultSize = 1;
 const Description = 'Assigns sizes as defined by the shape object.';
diff --git a/src/mol-theme/size/uncertainty.ts b/src/mol-theme/size/uncertainty.ts
index 1e042e8991bc4a3118c9ef432fbc4cfd021347e8..10bdf62cf59f2341069f6b1a597ad085671a47b2 100644
--- a/src/mol-theme/size/uncertainty.ts
+++ b/src/mol-theme/size/uncertainty.ts
@@ -6,7 +6,7 @@
 
 import { StructureElement, Unit, Bond, ElementIndex } from '../../mol-model/structure';
 import { Location } from '../../mol-model/location';
-import { SizeTheme } from '../size';
+import type { SizeTheme } from '../size';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 
diff --git a/src/mol-theme/size/uniform.ts b/src/mol-theme/size/uniform.ts
index 3bcbe98083e44cb3819fb973adae71c9f80ee656..b429c34700cb52a00bca50d1054349825cf1eae8 100644
--- a/src/mol-theme/size/uniform.ts
+++ b/src/mol-theme/size/uniform.ts
@@ -4,7 +4,7 @@
  * @author Alexander Rose <alexander.rose@weirdbyte.de>
  */
 
-import { SizeTheme } from '../size';
+import type { SizeTheme } from '../size';
 import { ParamDefinition as PD } from '../../mol-util/param-definition';
 import { ThemeDataContext } from '../../mol-theme/theme';
 
diff --git a/src/mol-util/input/input-observer.ts b/src/mol-util/input/input-observer.ts
index 56154c53140305edf15cfe35d05c55ec492b2930..f83b7e11a68c8ecfc9c766b19fa76a4bacf51478 100644
--- a/src/mol-util/input/input-observer.ts
+++ b/src/mol-util/input/input-observer.ts
@@ -106,7 +106,7 @@ export namespace ButtonsType {
     export const has: (btn: ButtonsType, f: Flag) => boolean = BitFlags.has;
     export const create: (fs: Flag) => ButtonsType = BitFlags.create;
 
-    export const enum Flag {
+    export enum Flag {
         /** No button or un-initialized */
         None = 0x0,
         /** Primary button (usually left) */
@@ -191,7 +191,7 @@ export type ResizeInput = {
 
 }
 
-const enum DraggingState {
+enum DraggingState {
     Stopped = 0,
     Started = 1,
     Moving = 2
diff --git a/src/servers/model/server/query.ts b/src/servers/model/server/query.ts
index ba71804ffe20e23e64da546d89f8377d881294bb..110decb3cc2ae692cf162238c75ed09579b82103 100644
--- a/src/servers/model/server/query.ts
+++ b/src/servers/model/server/query.ts
@@ -289,7 +289,7 @@ export function abortingObserver(p: Progress) {
 
 function string<T>(name: string, str: (data: T, i: number) => string, isSpecified?: (data: T) => boolean): CifField<number, T> {
     if (isSpecified) {
-        return CifField.str(name, (i, d) => str(d, i), { valueKind: (i, d) => isSpecified(d) ? Column.ValueKind.Present : Column.ValueKind.NotPresent });
+        return CifField.str(name, (i, d) => str(d, i), { valueKind: (i, d) => isSpecified(d) ? Column.ValueKinds.Present : Column.ValueKinds.NotPresent });
     }
     return CifField.str(name, (i, d) => str(d, i));
 }
diff --git a/src/servers/volume/server/query/encode.ts b/src/servers/volume/server/query/encode.ts
index 6cc789f373dc3d9228d7209270be30ef66684a36..c4e51958b0f127a5d22247ce2924d9ff9f71b6f6 100644
--- a/src/servers/volume/server/query/encode.ts
+++ b/src/servers/volume/server/query/encode.ts
@@ -29,7 +29,7 @@ interface ResultContext {
 
 function string<T>(name: string, str: (data: T) => string, isSpecified?: (data: T) => boolean): CifWriter.Field<number, T> {
     if (isSpecified) {
-        return CifWriter.Field.str(name, (i, d) => str(d), { valueKind: (i, d) => isSpecified(d) ? Column.ValueKind.Present : Column.ValueKind.NotPresent });
+        return CifWriter.Field.str(name, (i, d) => str(d), { valueKind: (i, d) => isSpecified(d) ? Column.ValueKinds.Present : Column.ValueKinds.NotPresent });
     }
     return CifWriter.Field.str(name, (i, d) => str(d));
 }