Potential bug fix
Further consolidation in dimker function.