Cleanup…
Minor optimizations.
Added some comments...