simplifiy array generation logic, use map instead of []+foreach
initial implementation of incident modal. Fixes #3