Finalize classes