Fixed updating

Only the current state will handle events and update.
Added shader class