Refactored shared option code to its own method
Improved shared option documentation