Refactor the code.
Move problems from other to dp package.