Refactored compilation pipeline (in preparation for having different compilation modes).
Changed symbol dependency specification.