Electronics and Optics of Graphene Nanoflakes: Edge Functionalization and Structural Distortions