fixed some major bug confusing # of components with # of dimensions
minor improvements