Added all basic requirement functionality to logic.php