Basic parsing and type replacement
cleanup