Class rework

DP part