Better Commander Script

Now only uses 2 raycasts in order to complete the script compared to 3+.
Also spilt the game and UI raycast into different functions.