add some helpers, cleanup file structure