Changed how a virtual switch is created: now it's defined as a custom type

Due to the limitations of the initial version (using a class type), it
was impossible to define more than one virtual switch. Now, the virtual
switch is defined as a new type, being able to define multiples resources
without any complain of the system.

Pending tasks: more testing, implement discovering and prefetching