Edge States and Flat Bands of Graphene Nanoribbons with Edge Modification