removes default index
some reorganization
fixes missing parens