Added classes to handle expressions and graphs