Fixed angle calculations, added code generation

Angle calculations added, added getX() and getY() methods for the
directed class. Code is generated, mostly functional.