[refac] separate core init & merge from location.hash