add new debug statements for mapping and resolving phases. Closes #41