Refactored code front type-dependent code to FrontWrapper struct.