Made 'parseCurrentElement' public.
Some refactoring