code refactor / bug fixing

code refactor / bug fixing. Cumpli el coding standard o te fajo ! ¬¬