pick up from the cleanup done by @Clindbergh

continue the PR started in #616