Code Tweaks and periods fetch from db
Merge pull request #361 from ti-nishant/HR-255-3

HR-255