* chore: moved all helpers and types to diff files * fix: cloning the incoming object to avoid mutation