Adding in some tests, renaming aggrigate functions