Added sign with keys method to transaction and did lots of small cleanups