Finished ScalarEncoder initialization and ScalarEncoderTest for same