Removed assertions with Messages in favor of typed exceptions.
Added logic to allow pre-specified sid filter.