Cleaned auxiliary code