Reverted undesired changes
Added back tests