Cleaned up Map function and put into dedicated file