Refactor code.
Fix [] return type.
Remove possible error supression.