adding require, restructured message app