Added arity, updated docs, cleaned up code