cleanup, small refactor, focus events added