Share calculation, error handling, other enhancements