renamed private members, new function capacity and some comment fix