Removed tests; refactor