Removed tabs, and reused Array.prototype.map instead of creating custom function.