Cleaning up code and attempting to remove undefined carousel objects