[BUG #8601] shortened if-conditions and improved function naming.