Fixed vector magnitude function and package imports