Code cleanup
Stock control