Global documentation update and code clean-up