adding postgres, updating mysql support. +small style changes