Adding stem class and graphics engine