Improved readability

Added some new comments on functions