Finally finished up normalization code