Created general settings model
Re-factored how stock is counted