Fixed monte-carlo calculations. Also generate_tables Makefile.