Set directory index and improved form controls