Updated comments and added type hint