ie debug and fixes + notes for refactor