Few clean ups on encoding and documentation