split events and positioning on several files
move hooks into separate files, extract CUSTOM_EVENT_TYPE