Added period switching in main view