Remove unused classes; change architecture