Readability update

Added comments  and reformatted to improve readability