Split class, rigs and libs into multiple files