Parital refactor
Updated Tests