First working version of decoder library