Added toJson method for AST, fixed toString method for empty container types