Optimised flow and fixed parse compilation errors