Further optimizations to automap