Moved anti aliasing to its own function