added ScalaDoc
added ScalaDoc
renamed constant
updating encode/decode logic
removing unneeded code