Removed unnecessary length variables