Implement units, adjust tests and documentation

See main thread