Slight cleanup

Made encryption/decryption of a file a member function of the encoder.
Code is now slightly prettier, but nowehre near being clean and
readable. Will tackle rest later.