Minor change: move variable settings to constructor