fixes problem with rank page columns, also adds definitions to all the complex ranking functions.