Changed DB query and adjusted some layout