move common js modules into separate directory (bug 949547)