register and trim all var declarations
All test cases now passing!