Cleaned up code for weights.py