Refined Stake Calculation for orphans

- Refined stake kernel calculation
- Made 40% of logging optional (use debugmode=true to enable extra
logging) for compact debug logs