Added some clarity and fixed bad map() logic