Added view export compilation helper function
Added comments