Some small reorganization of compiler