lots of improvements, now using event emitting classes to seperate stuff