More work

Added another function and tweaked the other ones some more