darwin module prototype and cleanup