Algo cleaned up a bit. Required SQL queries at bot