Remove unnecessary division of lower bound and refactor