Copied changes from AST branch that are independent of RDParser back to this branch.

Signed-off-by: Marius <UsYer@gmx.de>