Refactored shell builders

Added comments, sorted variables alphabetically.