Added first batch of tests. Improved error handling with custom Errors. Added reset function to graph