Making suggested changes to the code

Changes suggested by Julio Castillo