Changed sfx class to handle different file types