Reverted to previous function naming. Code cleanup
Removed excesive comments
Added documentation