Refactored init/index into separate modules

all tests passing