Fixed some floating point errors. Cleaned up automatic map making.