Added `[]`, `[]?` and `[]=`, and some code simplifications