Fixed failing PDO row counts, IP fetching, tidied up...