move the ruby parse/encode classes to own files