Optimized

* Removed unused variables
* Sets vairables to defualt to 0