Tidy code, remove threads, use norm ratio as efficiency measure