Refactored duplicate code and added block settings
Merge branch 'master' of https://github.com/amandadoughty/moodle-block_culupcoming_events