Adding changes based on code review
Removing output functions