added express, misc code refactoring