More pretty printing fixes, and core AST changes