Remove unused code
Update for handling 3-bit treatment number
Fix #55
Additional exception handling