Cleaned up diophantine code. Added std random to boilerplate.