Removed bunch of dead code,
Finished static pivot and added detailed comments explaining what is constant and what might change