Changed some variable names and sorted them