added percentages and top users cached table
type signature avoids warning
moved rendering functions to renderer
formatting
sql formatting