Better query function, some styling