Changed variable names for clarity, more verbose debug