Refactor floor and ceil to use function guard clauses. Add additional tests