Added automatic setting of the stock and top modules, will need refining to work with everything