db.inc.php cleaned and views restructured