1. using consts, 2. more comments, 3. implementation of updateLayer functionality
using const
using consts