refactor and cleanup for voigt profile fitting