segregated nodejs into classes