Move stockTocker logic to directive