Refactored methods and moved them to the Legislator class