Updated: Fixed some bad practices