Better organization for variables, fix on conditional