Added better key file support and the ability to add more cmd line flags