General naming and structure improvements. AST can now represent portions of pattern expressions, fixed #1.