added AS  database, added long+lat variables, added hostname variable, fixed some stuff