Removed duplicate port #'s on lintening ports
Refactored flat script into methods