Lint changes + vnc port fix

I changed some things to make lint happy and added the option to use a different vnc port than the default port. 

Also fixed a couple of issues when only 1 capture agent was returned by the server.