Added parameter to setCapacity( int length )

Refactored, all tests still work.