Added decode2 function
Placed exceptions in their own files and package
Implmented decode2() and fixed its bugs