factored out viewer and editor creation
styling improvements and loading real indexes