Fixed typos (map erroneously replaced to ap in comments).