Fixed major bad practices