split abstract quantity in more classes

Split in classes get the code more readable, and keep  safe for any one outside of the package.