refactoring to use npm modules. got all http ones done i think