Switching between classes now functions