Basic preprocessing