Fixed a serious bug. Made graphs nicer than the nicest. Headers and improved commenting everywhere... Starting to look like a final code. Hopefully. Because I don't have any more time to dedicate to this anyway.