starting to add event calendar and some refactoring