Removed a useless map, in favour of two static methods that perform just
as good a job.