Improved code docs
Updated and tested timing.