Rename j to v
Cleanup code