Remove unnecessary intermediate class