Added understandable comments on functions