Added regions for cleaner code view.