Various styling fixes
Added port detection. We're not just blindly assigning ports now