Some cleanup plus possibility to specify different graph_category

I wanted to be able to specify different graph_category; before that, however, I made several changes to cleanup the code and repository.