Fixed graphing and output. Improved API consistency.