Made the code in process.php more pretty and logical. It was a mess