Encoderwork - Phase 1 (Base encoder class and ScalarEncoder)

Fixes #75