Changed internal representation of weights to ints.