Improved parsing - rendering code