Fixing some bad practices