Changes in structure + some mocha tests