Documented code

Documented code synced with repot