Changes on Code to make it cleaner