Optimzed Syntax

replaced spaces with tab characters
used more correct usage of += and -=
ensured that remainder does not get added to all stats if it is depleted.
This line is what was missing before which is what was causing the bug. Now  'total' should never exceed 'bst'