split index into multiple files. added validators and widgets