Added 'test for primality' functionlity. Added optional cmdline supply of websocket URL and port number
Code Refactoring and documentation update