Added command handler, did some work on plot generation.