code refactoring; remove redundancies and sanitize transactions read from file or text