Fixed deprecated api warning
Made port configurable using the profile configuration