Towards understanding the electronic structure and ion fragmentation patterns of indole and related compounds