Created multi class and simplified code.