Better practices for JS and added in-stock check