Refactor index & period selected form. Fixes #6