Refactored stock init to main method