First version, still need to work on groups.