Cleaned up learning code, added learning of new map types