[Refactoring] Reduce dependencies between front-end and glue layer