Get exception message into returned array

Also remove unused variables/comments