redid lots of code.. added event system