Fixing issues with Mersenne WAL ragel conv

Fixed naming convention, removed unused
variables, cleaned up unneeded functions,
fixed various leaks, added better error handling,
and modified some buffer creations.