Reorganized code for it to be cleaner. Was getting impossible to know what you are looking for