Removed a lot of redundancy, also now using the proper port numbers instead of the defaults.