assign deprecated, using assign_perm
fixed tests, removed duplicates, pep8 cleanup