Vid 1502

There's a lot of code cleanup here so I commented in the places where the actual implementation is.