Added documentation and comments. Also now only checking for recent tx.