Reformatted code and organised imports for tests
Test that map only calls the calc once