Remove commented code from result.c
Revamp exception code in C
Added documentation