Fixed extra $ problem
Reorganized some stuff