refactor code, add normalization and alpha equivalence