Refactoring and removal of adddata.php page