Refactoring
Added support for representation switches