Better handling of caps and better mapping