Fixed shadowing
Added documentation.