Reorder header
Move lua core functions to own module