Added port listening code