Removed uneeded lists and moved to sets