got walls and gates working, fixed mouse func bug