Fixed norm function and added it to var.py.