added partsPErComp variable.
trying to improve addparts...
bug fixes and cleanup.