cleaned up the main a little, added support for a terminal parameter for the encryption key
merge fixes