fixed user input controlls
separated ghost code into own file