Moved some logic out from calendar.js
Revert "Moved some logic out from calendar.js"

This reverts commit af4d068597fbb89a8b99f287aa7437bba6dd8c2a.
Added settings modal